fix unit tests

このコミットが含まれているのは:
Henry Jameson 2022-10-10 22:04:49 +03:00
コミット 4a1ffced44
1個のファイルの変更6行の追加2行の削除

ファイルの表示

@ -211,8 +211,12 @@ const EmojiInput = {
if (!input) return
this.input = input
this.caretEl = hiddenOverlayCaret
suggestorPopover.setAnchorEl(this.caretEl)
this.$refs.picker.setAnchorEl(this.caretEl)
if (suggestorPopover.setAnchorEl) {
suggestorPopover.setAnchorEl(this.caretEl) // unit test compat
this.$refs.picker.setAnchorEl(this.caretEl)
} else {
console.warn('setAnchorEl not found, are we in a unit test?')
}
const style = getComputedStyle(this.input)
this.overlayStyle.padding = style.padding
this.overlayStyle.border = style.border