Bug 1566903 - Work-in-Progress Patch - Ensure that Ctrl/Cmd + F shortcut always re-selects the search bar query. r=jlast

This patch ensures that any existing query text in the search bar is highlighted when the Cmd/Ctrl + F shortcut is used.

Differential Revision: https://phabricator.services.mozilla.com/D38934

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kevin Morehouse 2019-07-29 19:33:17 +00:00
Родитель f403d7852a
Коммит 940cd11160
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -157,6 +157,9 @@ class SearchBar extends Component<Props, State> {
e.preventDefault();
const { editor, searchOn, setActiveSearch } = this.props;
// Set inputFocused to false, so that search query is highlighted whenever search shortcut is used, even if the input already has focus.
this.setState({ inputFocused: false });
if (!searchOn) {
setActiveSearch("file");
}