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
Workaround focus leaving input box on consecutive submissions #15479
Workaround focus leaving input box on consecutive submissions #15479
Conversation
Tested that it fails on main reproducing the issue: ``` - Expected - 0 + Received + 8 from time import sleep input() print('before sleep') sleep(0.1) print('after sleep') + + + x + + + + + ```
https://bugzilla.mozilla.org/show_bug.cgi?id=1867893 `:has()` is not only not yet officially supported but is hard to implement well so no wonder there are difficult invalidation bugs
Thanks for making a pull request to jupyterlab! |
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.
Thanks!
@meeseeksdev please backport to 4.0.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* Re-focus input after modifying model, keep input for 0.5s * Add a test case against the focus loss issue Tested that it fails on main reproducing the issue: ``` - Expected - 0 + Received + 8 from time import sleep input() print('before sleep') sleep(0.1) print('after sleep') + + + x + + + + + ``` * Give up on using animations and :has() solution due to FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=1867893 `:has()` is not only not yet officially supported but is hard to implement well so no wonder there are difficult invalidation bugs * More robust stdin test (cherry picked from commit 68be103)
* Re-focus input after modifying model, keep input for 0.5s * Add a test case against the focus loss issue Tested that it fails on main reproducing the issue: ``` - Expected - 0 + Received + 8 from time import sleep input() print('before sleep') sleep(0.1) print('after sleep') + + + x + + + + + ``` * Give up on using animations and :has() solution due to FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=1867893 `:has()` is not only not yet officially supported but is hard to implement well so no wonder there are difficult invalidation bugs * More robust stdin test (cherry picked from commit 68be103)
References
Fixes #12322
Code changes
User-facing changes
Users will be able to quickly send replies without the input box loosing focus and leading to the code editor being overwritten.
This is 99% solution - if the delay is over 0.5s it will fail.
Backwards-incompatible changes
None