Skip to content

Commit

Permalink
FIX: Minor hide search bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinfaveri committed May 9, 2020
1 parent 27aa99e commit 8e03e51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/TwemojiPicker/TwemojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ export default Vue.extend({
onScrollEmojiList(event: UIEvent) {
this.$refs.popupSkins.closePopper();
if (this.searchEmojisFeat) {
if ((event as any).target.scrollTop > 50) {
if ((event as any).target.scrollTop > 30) {
this.hideSearch = true;
} else {
this.hideSearch = false;
Expand Down
6 changes: 4 additions & 2 deletions src/components/TwemojiTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ export default Vue.extend({
this.actualContentLength = TwitterText.parseTweet(
content || ''
).weightedLength;
this.twemojiPicker.$refs.popupEmoji.popperInstance.forceUpdate();
if (this.twemojiPicker.$refs.popupEmoji)
this.twemojiPicker.$refs.popupEmoji.popperInstance.forceUpdate();
this.$emit('update:content', content);
this.$emit('actualContentLengthChanged', this.actualContentLength);
this.$emit('contentChanged', content);
Expand Down Expand Up @@ -263,7 +264,8 @@ export default Vue.extend({
}
this.twemojiTextarea.scrollTop = this.twemojiTextarea.scrollHeight;
this.twemojiPicker.$refs.popupEmoji.popperInstance.forceUpdate();
if (this.twemojiPicker.$refs.popupEmoji)
this.twemojiPicker.$refs.popupEmoji.popperInstance.forceUpdate();
},
onPaste(pasteEvent: ClipboardEvent): void {
let pastedData;
Expand Down

0 comments on commit 8e03e51

Please sign in to comment.