Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

blob: Always select search input value when pressing Mod-f#55546

Merged
fkling merged 2 commits into
mainfrom
fkling/54810-file-search-select
Aug 7, 2023
Merged

blob: Always select search input value when pressing Mod-f#55546
fkling merged 2 commits into
mainfrom
fkling/54810-file-search-select

Conversation

@fkling

@fkling fkling commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

Resolves #54810

Browsers' built-in search input will select the input value when pressing Mod-f, even when the focus is already on the search input.

The default CodeMirror behavior will only select the input value when the input is not already focused. This PR changes the behavior to match the browser's behavior.

Test plan

  • Open file page
  • Press Mod-f to open file search
  • Type any input value
  • Press Mod-f again -> input value is selected

@cla-bot cla-bot Bot added the cla-signed label Aug 3, 2023
@fkling fkling added team/code-search Issues owned by the code search team and removed cla-signed labels Aug 3, 2023
@cla-bot cla-bot Bot added the cla-signed label Aug 3, 2023
fkling added 2 commits August 3, 2023 14:06
Browers' built-in search input will select the input value when pressing
Mod-f, even when the focus is already on the search input.

The default CodeMirror behavior will only select the input value when
the input is not already focused. This PR changes the behavior to match
the browser's behavior.
@fkling fkling force-pushed the fkling/54810-file-search-select branch from be44f60 to 9a3c8c5 Compare August 3, 2023 12:06
@fkling fkling requested a review from a team August 3, 2023 12:08
@sourcegraph-bot

Copy link
Copy Markdown
Contributor

📖 Storybook live preview

@fkling fkling merged commit 633ed62 into main Aug 7, 2023
@fkling fkling deleted the fkling/54810-file-search-select branch August 7, 2023 09:40
davejrt pushed a commit that referenced this pull request Aug 9, 2023
Resolves #54810

Browsers' built-in search input will select the input value when
pressing Mod-f, even when the focus is already on the search input.

The default CodeMirror behavior will only select the input value when
the input is not already focused. This PR changes the behavior to match
the browser's behavior.



## Test plan

- Open file page
- Press `Mod-f` to open file search
- Type any input value
- Press `Mod-f` again -> input value is selected
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/code-search Issues owned by the code search team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cmd-F should highlight the search text in the search box if I press Cmd-F while focusing the search box

3 participants