소스 검색

update popover styles when caret updates

Henry Jameson 2 년 전
부모
커밋
11f9a7ba27
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/components/emoji_input/emoji_input.js

+ 3 - 1
src/components/emoji_input/emoji_input.js

@@ -278,7 +278,6 @@ const EmojiInput = {
           ...rest,
           img: imageUrl || ''
         }))
-      this.$refs.suggestorPopover.updateStyles()
     }
   },
   methods: {
@@ -536,6 +535,9 @@ const EmojiInput = {
     },
     setCaret ({ target: { selectionStart } }) {
       this.caret = selectionStart
+      this.$nextTick(() => {
+        this.$refs.suggestorPopover.updateStyles()
+      })
     },
     resize () {
     }