mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 14:19:17 +08:00
fix(core): swipe to go back gesture has priority over other horizontal swipe gestures (#28304)
Issue number: resolves #28303 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? - Swipe back gesture is inconsistently clobbered by ion-item-sliding's gesture. ## What is the new behavior? - Swipe back gesture now has a higher priority than ion-item-sliding - - ## Does this introduce a breaking change? - [ ] Yes - [X] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information This patch has been in use in [Voyager](https://github.com/aeharding/voyager) for the past couple months to great success! --------- Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
00767a02e4
commit
d5f0c776df
@ -79,7 +79,11 @@ export const createSwipeBackGesture = (
|
||||
return createGesture({
|
||||
el,
|
||||
gestureName: 'goback-swipe',
|
||||
gesturePriority: 40,
|
||||
/**
|
||||
* Swipe to go back should have priority over other horizontal swipe
|
||||
* gestures. These gestures have a priority of 100 which is why 101 was chosen here.
|
||||
*/
|
||||
gesturePriority: 101,
|
||||
threshold: 10,
|
||||
canStart,
|
||||
onStart: onStartHandler,
|
||||
|
||||
Reference in New Issue
Block a user