-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix scrolling issue in Firefox #92
base: master
Are you sure you want to change the base?
Conversation
Code looks good to me but I wonder if it is worth it to add a test case which would fail for current master, and which would pass using this branch? Or would that be too complicated? (or not super useful?) |
I've just incorporated a test, though I expect it to fail, as I've rolled back the previous code change – a change that this test should fail. About the test: Selenium doesn't provide a way to track the scrolling bar movement. So, I used a JavaScript command to capture the scroll bar's position. |
inst/htmljs/animint.js
Outdated
selector_table | ||
.style('height', `${selector_height}px`); | ||
}, 0); | ||
// setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the fix is commented, and the tests are still passing, this seems to imply that the test is not sufficient to capture the bug, is that right? @Faye-yufan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, this version of the test cannot capture the bug, I'm thinking of a new way to replicate the bug.
I checked out the Selenium Firefox Docker image, and it looks like the bug isn't there in version 2.53.0. That's probably why the test passed even without the fix. |
fix #90
Deferred setting of the
selector_table
height to prevent unintended scrollbar behavior.Used
setTimeout
with a delay of 0 ms to place the height setting operation on the JavaScript event loop, ensuring it executes after all current tasks and rendering operations are complete.This change appears to fix an issue where the scrollbar was moving upwards when interacting with Selectize.js elements in Firefox.