question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When the user opens `select`, and scroll, the screen will move.

See original GitHub issue

Bugs

What MDC-Web Version are you using?

v0.14.0

What browser(s) is this bug affecting?

All browsers

What OS are you using?

Windows 10

What are the steps to reproduce the bug?

https://material-components-web.appspot.com/select.html

What is the expected behavior?

When the user opens select, the body’s scroll bar should not be scrolled.

What is the actual behavior?

When the user opens select, and scroll, the screen will move.

Any other information you believe would be useful?

Ref: https://material.angular.io/components/select/overview

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
aeon0commented, Dec 11, 2017

I tried it on Linux and finally understand the behavior you describe. There are just two main differences to the current mdc-select behavior:

  1. The scrolling is locked, but the scrollbar is not hiding. With overflow: hidden, the scrollbar hides and then shows again which results in these ugly jumps of page width
  2. The current mdc-select only locks scrolling on the body. If the mdc-select is inside another scrollable parent it doesn’t work anymore.

Just things to keep in mind.

1reaction
aeon0commented, Dec 11, 2017

Hmm. I think for the time being, it would be much easier to mimic the default behavior on Windows where the select menu closes when you scroll outside of the menu opposed to the default Linux behavior (see discussion with @Garbee). So, listening to the onScroll event when the cursor position is outside of mdc-select__menu, I would close the select menu. Or maybe it is included in the event which element is scrolled, I am not sure right now. Opinions on that? Thanks a lot for taking the time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with Automatic Scrolling in Drop Down Menus and ...
Hi,. Ever since installing Windows 10, certain windows will scroll automatically to the side and/or down to the bottom as soon as I...
Read more >
Antd select and autocomplete list elements 'stick' on inner ...
The problem is - if I select an item in the Antd autocomplete - and then I scroll - you can see that...
Read more >
overscroll-behavior - CSS: Cascading Style Sheets | MDN
The overscroll-behavior CSS property sets what a browser does when reaching the boundary of a scrolling area.
Read more >
[console specific] Scrolling on picklist contained in a parent ...
You can use the arrow keys to move through the options. You can click the scrollbar and move it up/down without scrolling. You...
Read more >
Use VoiceOver to scroll to content on Mac - Apple Support (KZ)
In the Trackpad Commander pane of VoiceOver Utility, you can select a checkbox to scroll the content (not the scroll bar) down or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found