-
Notifications
You must be signed in to change notification settings - Fork 50
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
Jerky scrolling behavior on Firefox and mobile devices #152
Comments
The following patch fixes the scrolling issue but breaks the positioning: At first sight, the issue seems related to the fixed position of the host element. |
@valdrinkoshi Any thoughts? |
The reason why is janky is because One possible improvement would be to set <style>
.container { position: relative; }
</style>
<div class="container">
<iron-dropdown allow-outside-scroll> Would you be willing to give it a try? PR welcome! A solution that works with current implementation is unset vertical/horizontal-align and <style>
.container { position: relative; }
.container iron-dropdown {
position: absolute;
left: 0; /* vertical-align="left" */
top: 0; /* vertical-align="top" */
}
</style>
<div class="container">
<iron-dropdown allow-outside-scroll horizontal-align="" vertical-align=""> |
In terms of UX, <div style="position:relative">
<div style="position: absolute; top: 0; left: 0"> |
@valdrinkoshi Thanks a lot for your explanations. I was able to understand and fix the behavior. If I find the time, I will look for the PR you have suggested. |
When
allowOutsideScroll
istrue
and you tap on the element to display itsdropdown-content
and then scroll, thedropdown-content
take a few milliseconds to realign, thus making the movement jerky.I am able to reproduce the issue with
iron-dropdown
version 2.2.0 on Firefox but also Chrome on Android. That's really annoying, especially if the drop-down is kept open on a page for demo purposes. The behavior is too jerky.The
iron-dropdown
demo page is a good place to reproduce the issue. Open it, move to "Scroll actions" example and click on "Refit on scroll" button. Then, scroll down and up several times.Another example in a landing page:
https://noticeable.io
Look at the widget in the center when you scroll down and up.
This issue seems there since months. Any workarounds or ideas about the cause of this jerky movement on scrolling?
The text was updated successfully, but these errors were encountered: