-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(range): disable scroll when range is being dragged #29241
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -325,7 +325,8 @@ export class Range implements ComponentInterface { | |||
this.setupGesture(); | |||
} | |||
|
|||
this.contentEl = findClosestIonContent(this.el); | |||
const ionContent = findClosestIonContent(this.el); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scroll target test was failing because we didn't take into account that there might be a custom scroll target.
@@ -418,7 +419,7 @@ export class Range implements ComponentInterface { | |||
* | |||
* This only needs to be done once. | |||
*/ | |||
if (contentEl && this.initialContentScrollY === undefined) { | |||
if (contentEl && this.pressedKnob === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scroll was never being disabled which lead to flaky results.
@@ -99,31 +107,6 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => | |||
|
|||
expect(rangeEndSpy.length).toBe(1); | |||
}); | |||
|
|||
// TODO FW-2873 | |||
test.skip('should not scroll when the knob is swiped', async ({ page, skip }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this test to it's own test page to properly test the scroll since the basic page didn't have enough content to scroll on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue number: internal
What is the current behavior?
There are a few tests that were disabled due to being flaky from gestures.
What is the new behavior?
While fixing the tests, I found a bug that the scroll was never being disabled on scroll. Additionally, we were not taking into account that a custom scroll target could be used so it was never disabled either.
ion-content
or a custom scroll target.Does this introduce a breaking change?
Other information
Preview for
ion-content
Preview for custom scroll target
How to test: