FIX: Close hyperlink modal on ESC key (#13166)

This commit is contained in:
Penar Musaraj 2021-05-26 15:11:12 -04:00 committed by GitHub
parent 83dd47f0b4
commit ea68bab135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,6 @@ export default Controller.extend(ModalFunctionality, {
schedule("afterRender", () => {
const element = document.querySelector(".insert-link");
element.addEventListener("keydown", this.keyDown);
element
@ -57,6 +56,8 @@ export default Controller.extend(ModalFunctionality, {
this.set("searchResults", []);
event.preventDefault();
event.stopPropagation();
} else {
this.send("closeModal");
}
break;
}