Ver Fonte

Небольшие поправки

Book Pauk há 4 anos atrás
pai
commit
48c93a2120

+ 5 - 2
client/components/App.vue

@@ -92,10 +92,13 @@ class App extends Vue {
 
         document.addEventListener('keyup', (event) => {
             this.keyHook(event);
-        });        
+        });
+        document.addEventListener('keypress', (event) => {
+            this.keyHook(event);
+        });
         document.addEventListener('keydown', (event) => {
             this.keyHook(event);
-        });        
+        });
         window.addEventListener('resize', () => {
             this.$root.$emit('resize');
         });

+ 1 - 1
client/components/ExternalLibs/ExternalLibs.vue

@@ -498,7 +498,7 @@ class ExternalLibs extends Vue {
 
             //недостатки сторонних ui
             const input = this.$refs.input.$refs.input;
-            if (document.activeElement === input && event.type == 'keydown' && event.code == 'Enter') {
+            if (document.activeElement === input && event.type == 'keypress' && event.code == 'Enter') {
                 this.submitUrl();
                 return true;
             }

+ 1 - 1
client/components/Reader/LoaderPage/LoaderPage.vue

@@ -173,7 +173,7 @@ class LoaderPage extends Vue {
 
         //недостатки сторонних ui
         const input = this.$refs.input.$refs.input;
-        if (document.activeElement === input && event.type == 'keydown' && event.code == 'Enter') {
+        if (document.activeElement === input && event.type == 'keypress' && event.code == 'Enter') {
             this.submitUrl();
             return true;
         }