Skip to content

Commit d5f0c77

Browse files
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 <[email protected]>
1 parent 00767a0 commit d5f0c77

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/utils/gesture/swipe-back.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ export const createSwipeBackGesture = (
7979
return createGesture({
8080
el,
8181
gestureName: 'goback-swipe',
82-
gesturePriority: 40,
82+
/**
83+
* Swipe to go back should have priority over other horizontal swipe
84+
* gestures. These gestures have a priority of 100 which is why 101 was chosen here.
85+
*/
86+
gesturePriority: 101,
8387
threshold: 10,
8488
canStart,
8589
onStart: onStartHandler,

0 commit comments

Comments
 (0)