-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Focus-with-select when focusing Search box (#7932) #8073
Conversation
Focus-with-select when focusing Search box (Issue jupyterlab#7932) https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement Old: `focus()` Focuses on the input element; keystrokes will subsequently go to this element. New: `select()` Selects all the text in the input element, and focuses it so the user can subsequently replace all of its content.
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
This is a speculative fix. I don't have a development environment set up. (I might try the binder test env later.) |
Test failures are 17 ways of saying "timeout", I think while waiting for startup. I don't see any specifics of what was stuck. I have no idea how to address that. |
Lots of these in error log: |
Interactive manual testing on https://hub.gke.mybinder.org/user/misterbeebee-jupyterlab-ps312o3y/lab-dev/lab ctrl-F search to focus-with-select seems to be working as desired. |
Thanks, this works great! A definite improvement to the UX. |
Thank you for setting up a fantastic environment for online code editing and automatic continuous integration test binders. It was great to be able to create, test, and submit this tiny fix using only the web browser and not learning how to set up anything. |
References
Issue #7932
Code changes
Focus-with-select when focusing Search box
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
Old:
focus()
Focuses on the input element; keystrokes will subsequently go to this element.New:
select()
Selects all the text in the input element, and focuses it so the user can subsequently replace all of its content.User-facing changes
Focus-with-select when focusing Search box.
Test env setup on
https://mybinder.org/v2/gh/misterbeebee/jupyterlab/patch-1?urlpath=lab-dev
Before:
After:
Backwards-incompatible changes
N/A