Преглед изворни кода

fix(modal): focus on input

Gerald пре 6 година
родитељ
комит
21cb552ea7
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/options/views/message.vue

+ 5 - 1
src/options/views/message.vue

@@ -34,7 +34,11 @@ export default {
   },
   mounted() {
     const input = this.$el.querySelector('input');
-    if (input) input.focus();
+    if (input) {
+      setTimeout(() => {
+        input.focus();
+      });
+    }
   },
   beforeDestroy() {
     const i = dismissers.indexOf(this.dismiss);