зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f403d7852a
Коммит
940cd11160
|
@ -157,6 +157,9 @@ class SearchBar extends Component<Props, State> {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const { editor, searchOn, setActiveSearch } = this.props;
|
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) {
|
if (!searchOn) {
|
||||||
setActiveSearch("file");
|
setActiveSearch("file");
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче