FIX: Close hyperlink modal on ESC key (#13166)
This commit is contained in:
parent
83dd47f0b4
commit
ea68bab135
|
@ -22,7 +22,6 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
|
|
||||||
schedule("afterRender", () => {
|
schedule("afterRender", () => {
|
||||||
const element = document.querySelector(".insert-link");
|
const element = document.querySelector(".insert-link");
|
||||||
|
|
||||||
element.addEventListener("keydown", this.keyDown);
|
element.addEventListener("keydown", this.keyDown);
|
||||||
|
|
||||||
element
|
element
|
||||||
|
@ -57,6 +56,8 @@ export default Controller.extend(ModalFunctionality, {
|
||||||
this.set("searchResults", []);
|
this.set("searchResults", []);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
} else {
|
||||||
|
this.send("closeModal");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue