use anchor for picker

このコミットが含まれているのは:
Henry Jameson 2022-10-10 00:37:59 +03:00
コミット d2fabe1a71
2個のファイルの変更5行の追加1行の削除

ファイルの表示

@ -141,6 +141,7 @@ const EmojiInput = {
return this.focused &&
this.suggestions &&
this.suggestions.length > 0 &&
!this.pickerShown &&
!this.temporarilyHideSuggestions
},
textAtCaret () {
@ -205,6 +206,7 @@ const EmojiInput = {
this.input = input
this.caretEl = hiddenOverlayCaret
suggestorPopover.setAnchorEl(this.caretEl)
this.$refs.picker.setAnchorEl(this.caretEl)
const style = getComputedStyle(this.input)
this.overlayStyle.padding = style.padding
this.overlayStyle.border = style.border

ファイルの表示

@ -113,13 +113,15 @@ const EmojiPicker = {
},
methods: {
showPicker () {
console.log('pick')
this.$refs.popover.showPopover()
this.onShowing()
},
hidePicker () {
this.$refs.popover.hidePopover()
},
setAnchorEl (el) {
this.$refs.popover.setAnchorEl(el)
},
setGroupRef (name) {
return el => { this.groupRefs[name] = el }
},