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 42e615f commit 73106d4Copy full SHA for 73106d4
app/design/adminhtml/Magento/backend/web/js/theme.js
@@ -345,6 +345,25 @@ define('globalSearch', [
345
this.input.on('focus.activateGlobalSearchForm', function () {
346
self.field.addClass(self.options.fieldActiveClass);
347
});
348
+
349
+ $(document).keydown(function (e) {
350
+ var inputs = [
351
+ 'input',
352
+ 'select',
353
+ 'textarea'
354
+ ];
355
356
+ if (e.which !== 191 || // forward slash - '/'
357
+ inputs.indexOf(e.target.tagName.toLowerCase()) !== -1 ||
358
+ e.target.isContentEditable
359
+ ) {
360
+ return;
361
+ }
362
363
+ e.preventDefault();
364
365
+ self.input.focus();
366
+ });
367
}
368
369
0 commit comments