DEV: revert linting workaround for emoji picker `keydown` action (#15424)
This commit is contained in:
parent
bbca25e875
commit
05eaedc810
|
@ -89,8 +89,6 @@ export default Component.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
emojiPicker.addEventListener("keydown", this._keyDown);
|
||||
|
||||
const textareaWrapper = document.querySelector(
|
||||
".d-editor-textarea-wrapper"
|
||||
);
|
||||
|
@ -139,9 +137,6 @@ export default Component.extend({
|
|||
@action
|
||||
onClose() {
|
||||
document.removeEventListener("click", this.handleOutsideClick);
|
||||
document
|
||||
.querySelector(".emoji-picker")
|
||||
?.removeEventListener("keydown", this._keyDown);
|
||||
this.onEmojiPickerClose && this.onEmojiPickerClose();
|
||||
},
|
||||
|
||||
|
@ -220,8 +215,8 @@ export default Component.extend({
|
|||
section && section.scrollIntoView();
|
||||
},
|
||||
|
||||
@bind
|
||||
_keyDown(event) {
|
||||
@action
|
||||
keydown(event) {
|
||||
if (event.code === "Escape") {
|
||||
this.onClose();
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{{#if isActive}}
|
||||
<div class="emoji-picker {{if @isActive "opened"}}">
|
||||
{{!-- template-lint-disable no-invalid-interactive --}}
|
||||
<div {{on "keydown" (action "keydown")}} class="emoji-picker {{if @isActive "opened"}}">
|
||||
{{!-- template-lint-enable no-invalid-interactive --}}
|
||||
<div class="emoji-picker-category-buttons">
|
||||
{{#if recentEmojis.length}}
|
||||
<button type="button" data-section="recent" {{action "onCategorySelection" "recent"}} class="btn btn-default category-button emoji">
|
||||
|
|
Loading…
Reference in New Issue