Skip to content

Commit fb7824b

Browse files
authored
Pan shouldCancelWhenOutside fix (#2256)
## Description Current `updateGestureConfig` function in `PanGestureHandler` assigns false value to `shouldCancelWhenOutside` pretty much all the time. This happens especially when the value passed in config is `true` - that shouldn't happen because it basically flips the logic. ## Test plan Tested on example app
1 parent bbb85d8 commit fb7824b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/web/handlers/PanGestureHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export default class PanGestureHandler extends GestureHandler {
9898
this.activateAfterLongPress = this.config.activateAfterLongPress;
9999
}
100100

101-
if (this.config.shouldCancelWhenOutside) {
102-
this.setShouldCancelWhenOutside(false);
101+
if (this.config.shouldCancelWhenOutside !== undefined) {
102+
this.setShouldCancelWhenOutside(this.config.shouldCancelWhenOutside);
103103
}
104104

105105
if (this.config.activeOffsetXStart !== undefined) {

0 commit comments

Comments
 (0)