Skip to content

Commit

Permalink
Fix touch passing down when overlapping TextInputs (#5189)
Browse files Browse the repository at this point in the history
* Fix touch passing down when overlapping

* Always return True to catch the touch

* Return True for scrolling
  • Loading branch information
KeyWeeUsr committed Jun 6, 2017
1 parent 5e2b718 commit 27e3b90
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kivy/uix/textinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -1334,22 +1334,22 @@ def on_touch_down(self, touch):
if scroll_type == 'down':
if self.multiline:
if self.scroll_y <= 0:
return
return True
self.scroll_y -= self.line_height
else:
if self.scroll_x <= 0:
return
return True
self.scroll_x -= self.line_height
if scroll_type == 'up':
if self.multiline:
if (self._lines_rects[-1].pos[1] > self.y +
self.line_height):
return
return True
self.scroll_y += self.line_height
else:
if (self.scroll_x + self.width >=
self._lines_rects[-1].texture.size[0]):
return
return True
self.scroll_x += self.line_height

touch.grab(self)
Expand Down Expand Up @@ -1378,7 +1378,7 @@ def on_touch_down(self, touch):
self.insert_text(CutBuffer.get_cutbuffer())
return True

return False
return True

def on_touch_move(self, touch):
if touch.grab_current is not self:
Expand Down

0 comments on commit 27e3b90

Please sign in to comment.