Skip to content

Commit

Permalink
Improved code for focus behavior patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bakterija committed Jul 5, 2017
1 parent 2b110ab commit bb80255
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions kivy/uix/behaviors/focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,11 @@ def __init__(self, **kwargs):
fbind('focus_previous', self._set_on_focus_previous)

def _on_focusable(self, instance, value):
if not value and self.focus:
self.focus = False
self._unbind_keyboard()
elif self.disabled or not self.is_focusable:
if self.disabled or not self.is_focusable:
self.focus = False

def _on_focus(self, instance, value, *largs):
if self.is_focusable and self.keyboard_mode == 'auto':
if self.keyboard_mode == 'auto':
if value:
self._bind_keyboard()
else:
Expand Down

0 comments on commit bb80255

Please sign in to comment.