Skip to content

Commit 5aa7f17

Browse files
committed
When the Navigation panel is open and the list of its menu is scrolled, the event is also processed on the cards - Fixed
1 parent d36a68a commit 5aa7f17

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kivymd/cards.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def callback(instance, value):
137137
from kivymd.elevationbehavior import RectangularElevationBehavior
138138
from kivymd.list import ILeftBody
139139
from kivymd.menus import MDDropdownMenu
140+
from kivymd.navigationdrawer import NavigationLayout
140141
from kivymd.theming import ThemableBehavior
141142

142143
Builder.load_string('''
@@ -434,6 +435,13 @@ def on_touch_move(self, touch):
434435
if self.collide_point(*touch.pos) and self.swipe and\
435436
not self._card_shifted:
436437
if touch.x < Window.width - 10:
438+
# When the Navigation panel is open and
439+
# the list of its menu is scrolled,
440+
# the event is also processed on the cards
441+
for widget in Window.children:
442+
if widget.__class__ is NavigationLayout:
443+
if widget.state == 'open':
444+
return
437445
self.shift_post_left()
438446
return super(MDCardPost, self).on_touch_move(touch)
439447

0 commit comments

Comments
 (0)