Fix ScrollIntoView - correct position for the focus#10224
Merged
christian-bromann merged 5 commits intowebdriverio:mainfrom Apr 20, 2023
lacell75:fixScroll
Merged
Fix ScrollIntoView - correct position for the focus#10224christian-bromann merged 5 commits intowebdriverio:mainfrom lacell75:fixScroll
christian-bromann merged 5 commits intowebdriverio:mainfrom
lacell75:fixScroll
Conversation
Member
|
@lacell75 thanks for raising the PR The solution seems reasonable even though I am not sure if it has implications on other use cases. However the test seems to legitimately fail: |
Contributor
Author
|
Yes. The calculation for the start, end,.. position is different if a
scroll has been done before.
For now, I didn't find the solution to fix it.
Le mar. 18 avr. 2023 à 19:38, Christian Bromann ***@***.***>
a écrit :
… @lacell75 <https://github.com/lacell75> thanks for raising the PR
The solution seems reasonable even though I am not sure if it has
implications on other use cases. However the test seems to legitimately
fail: e2e/wdio/headless/test.e2e.ts:91:36
—
Reply to this email directly, view it on GitHub
<#10224 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH5XZJHWRXFX5C5NS57LQHLXB3GQ3ANCNFSM6AAAAAAXCIQIUI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Author
|
@christian-bromann PR ready to review |
Member
@lacell75 did you see my comment? I wonder if we can optimize the e2e test a bit |
Contributor
Author
Sorry, I had not seen your comment. Improvement done |
Contributor
Author
|
I think everything is ok now |
christian-bromann
approved these changes
Apr 20, 2023
Member
christian-bromann
left a comment
There was a problem hiding this comment.
Great work, amazing change 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
In case where there are several possible scrolls in the page(example: a page with a left menu), the scroll doesn't work on the other parts of the page because the focus by default is positioned at x:0 , y:0.
To fix it, I just added the origin element in argument.
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers