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

document.body.clientWidth changes when opening the drawer on Windows #375

Open
4 of 8 tasks
gronke opened this issue Nov 2, 2016 · 4 comments
Open
4 of 8 tasks

Comments

@gronke
Copy link

gronke commented Nov 2, 2016

Description

Content size changes when opening the drawer on Windows.

Expected outcome

The window content size does not change when activating the drawer.

Actual outcome

The scroll-bar disappears when activating the drawer which causes an update of document.body.clientWidth.

Demo

This example shows the effect on a Windows 10 with Chrome 54.0.2840.71

zuperkul-windows-drawer-scrollbar

Steps to reproduce

  1. Open https://polymerelements.github.io/app-layout/ in a Windows 10 Chrome
  2. Click the menu icon to activate the drawer menu in the smartphone preview

Browsers Affected

Tested on Windows 10

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@keanulee
Copy link
Contributor

keanulee commented Nov 2, 2016

Note that this is because we disable scrolling when the drawer is opened, so if there's a scrollbar, it is removed from the view and the viewport will resize.

@blasten
Copy link
Contributor

blasten commented Nov 3, 2016

@keanulee is this a wontfix?

@gronke
Copy link
Author

gronke commented Nov 3, 2016

I did not have time yet to come up with a solution. Wanted to spike on locking the body scroll position from script rather than CSS to leave the Scrollbar enabled while showing the overlay. Is it worth to create a PR with that solution?

@keanulee
Copy link
Contributor

keanulee commented Nov 4, 2016

One option is to make the disable-scrolling feature optional, which would keep the scrollbar when the drawer is opened. However, being able to scroll the content below would not be a good UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants