We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 714c153 commit 116ba91Copy full SHA for 116ba91
addon/components/docs-header/search-box/component.js
@@ -5,6 +5,7 @@ import { on } from '@ember/object/evented';
5
import { task } from 'ember-concurrency';
6
import config from 'dummy/config/environment';
7
import { inject as service } from '@ember/service';
8
+import { formElementHasFocus } from 'ember-cli-addon-docs/keyboard-config';
9
10
const projectName = config['ember-cli-addon-docs'].projectName;
11
@@ -33,7 +34,9 @@ export default Component.extend(EKMixin, {
33
34
}),
35
36
focusSearch: on(keyUp('Slash'), function() {
- this.element.querySelector('input').focus();
37
+ if (!formElementHasFocus()) {
38
+ this.element.querySelector('input').focus();
39
+ }
40
41
42
unfocusSearch: on(keyUp('Escape'), function() {
0 commit comments