DEV: Handle emoji-picker and d-editor being destroyed simultaneously (#17109)

This commit is contained in:
David Taylor 2022-06-16 17:16:15 +01:00 committed by GitHub
parent c00205730e
commit 691afa2593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -672,6 +672,13 @@ export default Component.extend(TextareaTextManipulation, {
return true;
},
@action
onEmojiPickerClose() {
if (!(this.isDestroyed || this.isDestroying)) {
this.set("emojiPickerIsActive", false);
}
},
actions: {
emoji() {
if (this.disabled) {

View File

@ -74,5 +74,5 @@
isEditorFocused=isEditorFocused
initialFilter=this.emojiFilter
emojiSelected=(action "emojiSelected")
onEmojiPickerClose=(action (mut emojiPickerIsActive) false)
onEmojiPickerClose=onEmojiPickerClose
}}