Browse Source

fix(modal): focus on input

Gerald 6 years ago
parent
commit
21cb552ea7
1 changed files with 5 additions and 1 deletions
  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);