Добавил активацию HelpPage на хоткеи в LoaderPage

This commit is contained in:
Book Pauk
2019-02-10 22:00:43 +07:00
parent 007e3504f9
commit 1470358371

View File

@@ -91,9 +91,17 @@ class LoaderPage extends Vue {
keyHook(event) {
//недостатки сторонних ui
if (document.activeElement === this.$refs.input.$refs.input && event.type == 'keydown' && event.key == 'Enter') {
const input = this.$refs.input.$refs.input;
if (document.activeElement === input && event.type == 'keydown' && event.code == 'Enter') {
this.submitUrl();
}
if (event.type == 'keydown' && (event.code == 'F1' || (document.activeElement !== input && event.code == 'KeyH'))) {
this.$emit('help-toggle');
event.preventDefault();
event.stopPropagation();
return true;
}
}
}
//-----------------------------------------------------------------------------