On window blur, immediately hide keyboard hints (#14529)
* On window blur, immediately hide keyboard hints * De-param
This commit is contained in:
parent
a381ecaa09
commit
add8383c77
|
@ -1,3 +1,4 @@
|
|||
import { set } from '@ember/object';
|
||||
import Component from '@glimmer/component';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { computed } from '@ember/object';
|
||||
|
@ -8,6 +9,13 @@ export default class KeyboardShortcutsModalComponent extends Component {
|
|||
@service keyboard;
|
||||
@service config;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
window.addEventListener('blur', () => {
|
||||
set(this, 'keyboard.displayHints', false);
|
||||
});
|
||||
}
|
||||
|
||||
escapeCommand = {
|
||||
label: 'Hide Keyboard Shortcuts',
|
||||
pattern: ['Escape'],
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
|
||||
// Global keyboard hint style
|
||||
|
||||
// .display-hints {
|
||||
[data-shortcut] {
|
||||
background: lighten($nomad-green, 25%);
|
||||
border: 1px solid $nomad-green-dark;
|
||||
|
@ -113,7 +112,6 @@
|
|||
z-index: $z-tooltip;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
@keyframes slideIn {
|
||||
from {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
@source={{p.list}}
|
||||
@sortProperty={{this.sortProperty}}
|
||||
@sortDescending={{this.sortDescending}}
|
||||
@class="with-foot {{if this.keyboard.displayHints "display-hints"}}" as |t|
|
||||
@class="with-foot" as |t|
|
||||
>
|
||||
<t.head>
|
||||
<t.sort-by @prop="name">
|
||||
|
|
Loading…
Reference in New Issue