Skip to content

Commit

Permalink
Fixed global-search keyboard shortcut for non-english keyboard layouts.
Browse files Browse the repository at this point in the history
Closes #10646
  • Loading branch information
apollo13 committed Jun 7, 2021
1 parent bdf2555 commit 1c02cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BUG FIXES:
* drivers/exec: Fixed a bug where `exec` and `java` tasks inherit the Nomad agent's `oom_score_adj` value [[GH-10698](https://github.com/hashicorp/nomad/issues/10698)]
* quotas (Enterprise): Fixed a bug where stopped allocations for a failed deployment can be double-credited to quota limits, resulting in a quota limit bypass. [[GH-10694](https://github.com/hashicorp/nomad/issues/10694)]
* ui: Fixed a bug where exec would not work across regions. [[GH-10539](https://github.com/hashicorp/nomad/issues/10539)]
* ui: Fixed global-search shortcut for non-english keyboards. [[GH-10714](https://github.com/hashicorp/nomad/issues/10714)]

## 1.1.0 (May 18, 2021)

Expand Down
4 changes: 2 additions & 2 deletions ui/app/components/global-search/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { action, set } from '@ember/object';
import { inject as service } from '@ember/service';
import { debounce, run } from '@ember/runloop';

const SLASH_KEY = 191;
const SLASH_KEY = '/';
const MAXIMUM_RESULTS = 10;

@classNames('global-search-container')
Expand All @@ -24,7 +24,7 @@ export default class GlobalSearchControl extends Component {
const targetElementName = e.target.nodeName.toLowerCase();

if (targetElementName != 'input' && targetElementName != 'textarea') {
if (e.keyCode === SLASH_KEY) {
if (e.key === SLASH_KEY) {
e.preventDefault();
this.open();
}
Expand Down

0 comments on commit 1c02cb0

Please sign in to comment.