Skip to content
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

ScrollIntoView() causing the whole page to move #1529

Open
jackiotyu opened this issue May 18, 2023 · 5 comments
Open

ScrollIntoView() causing the whole page to move #1529

jackiotyu opened this issue May 18, 2023 · 5 comments
Labels
bug Something isn't working tracked

Comments

@jackiotyu
Copy link

jackiotyu commented May 18, 2023

  • OS: Windows 11
  • Extension version: v2.1.1

Describe the bug:

the whole page to move while click the console panel or focus some elements

Repro steps:

devtools start with elements panel.
click console panel.

Expected behavior:

Keep the devtools in its original position
Additional context:
It works with my custom devtools build.
https://stackoverflow.com/questions/11039885/scrollintoview-causing-the-whole-page-to-move

image image
@captainbrosset
Copy link
Collaborator

Thanks for reporting this.
I'm a little unclear as to whether this something that happens within your web page only, or if there is also a scrolling problem in DevTools? Are you seeing the DevTools panel scroll? If so, could you please provide a screen recording?

@captainbrosset captainbrosset added the question Further information is requested label May 19, 2023
@jackiotyu
Copy link
Author

It's the devtools's panel scrolling problem. I will provide screen recording later.

@jackiotyu
Copy link
Author

jackiotyu commented May 19, 2023

edge-devtools
image

It will be offset by about 4px

webview-devtools
It can be fixed by giving more params to scrollIntoView method.
Just a suggestion🤝

@captainbrosset
Copy link
Collaborator

Amazing, thank you for the additional information and screen recordings. They help a lot.
Let me make sure this is tracked by the team for prioritization.

@captainbrosset captainbrosset added bug Something isn't working tracked and removed question Further information is requested labels May 23, 2023
@AXLWeb
Copy link

AXLWeb commented Sep 13, 2023

Did anyone found any work-around ? I am facing a very similar issue. When having more scrolls in page and one layer has an animation with width (from 0 to 100%) scrollintoView reveals that hidden layer.

Check this demo: https://jsfiddle.net/nb6ag897/

Notice that when you have other scrolls whole page is moved instead of just desired scroll area.
Does anyone knows a workaround to prevent this happening ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked
Projects
None yet
Development

No branches or pull requests

3 participants