Skip to content
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

Merged
merged 1 commit into from Mar 24, 2020

Conversation

misterbeebee
Copy link
Contributor

@misterbeebee misterbeebee commented Mar 23, 2020

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:
before

After:
after

Backwards-incompatible changes

N/A

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.
@jupyterlab-dev-mode
Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Mar 23, 2020

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 23, 2020

This is a speculative fix. I don't have a development environment set up.
I welcome anyone else to clone this and test it before merging.

(I might try the binder test env later.)

@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 23, 2020

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.

@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 23, 2020

Lots of these in error log:
"(line 32) broken [URL GOES HERE] - 429 Client Error: too many requests for url: "

@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 23, 2020

@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 23, 2020

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.

@jasongrout jasongrout added this to the 2.1 milestone Mar 24, 2020
@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Mar 24, 2020

Thanks, this works great! A definite improvement to the UX.

@jasongrout jasongrout merged commit 7a97e8f into jupyterlab:master Mar 24, 2020
44 of 49 checks passed
@misterbeebee
Copy link
Contributor Author

@misterbeebee misterbeebee commented Mar 24, 2020

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.

@lock lock bot added the status:resolved-locked label Apr 25, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg:documentsearch status:resolved-locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants