commit: d2fabe1a71207f92e10283fc5a881d883cb52ae1
parent 8fa1f0b50dcf51e976330163b819dfaf82d30a53
Author: Henry Jameson <me@hjkos.com>
Date: Mon, 10 Oct 2022 00:37:59 +0300
use anchor for picker
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js
@@ -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
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
@@ -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 }
},