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

Ensure that input in recently open files modal is focused #16199

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Apr 19, 2024

References

Fixes #16194

Code changes

  • adds a new expectation in the test to not rely on subtle styling changes on snapshots
  • fixes the issue by traversing into the shadow DOM

User-facing changes

The search box in the recently closed modal gets properly focused after opening it.

Backwards-incompatible changes

None

@krassowski krassowski added the bug label Apr 19, 2024
@krassowski krassowski added this to the 4.2.0 milestone Apr 19, 2024
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The focus indicator is not pretty but this is out of scope for this PR.

@krassowski krassowski marked this pull request as ready for review April 19, 2024 12:02
@krassowski krassowski changed the title Ensuring recently open modal input is focused Ensure that input in recently open files modal is focused Apr 19, 2024
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @krassowski

@krassowski krassowski merged commit f576fb0 into jupyterlab:main Apr 19, 2024
80 of 83 checks passed
gderocher pushed a commit to gderocher/jupyterlab that referenced this pull request Apr 26, 2024
…#16199)

* Add a test ensuring the modal input is focused

* Await the `expect` promise

* Set the focus on input inside the shadow DOM

* Update snapshot which now shows the focus indicator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search/filter boxes no longer autofocus in modal
2 participants