-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Scroll position jumps when mousedown on multi-line selection in nested inline editor #3081
Comments
I did a little investigation in the downstream Brackets bug (adobe/brackets#10590), but it's tough to tell what's going on. Mousedown causes a brief focus change from the textarea to the I'm unclear why the length of the text selection has any influence on this behavior -- that may be a valuable clue. |
What appears to be happening is that Chrome tries to scroll the whole block of selected text (in the hidden textarea) into view, whether it is visible or not. That is why this doesn't happen if you only select a few lines. I've submitted Chrome issue 459071 with a reduced reproduction case. I tried some workaround (fiddling with the CSS style on the textarea, and setting If you have leverage to help get this fixed on the Chrome side, that's probably our best bet. |
Mitigated by #3100. Closing in the hope that the Chrome team will fix the underlying bug and eventually cause this to become a non-issue entirely. |
This may only reproduce on Mac. I'm able to repro with Chrome 40.0.2214.111 on both Mac OS 10.9 and Mac OS 10.10. Haven't tried other browsers yet.
Result: outer editor's viewport scrolls down ~7 lines, so line 40 is now at the top of the view
Expected: no scrolling
Although this simple testcase isn't tuned to show it, in Brackets we're seeing cases where the scroll position will jump by several hundred lines.
Note that if you select fewer lines, or if the inline editor is near the top of the viewport, the bug is less likely to reproduce (and if it does repo, the jump is smaller).
The text was updated successfully, but these errors were encountered: