From 0b5c5b646f43e88b25140c10738b2f1ec7bf36ed Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Fri, 31 Mar 2023 22:50:36 -0700 Subject: [PATCH] Correct fix for Ctrl+Z shortcut in image editor --- ui/media/js/image-editor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/media/js/image-editor.js b/ui/media/js/image-editor.js index 68ca969a..c8e82b40 100644 --- a/ui/media/js/image-editor.js +++ b/ui/media/js/image-editor.js @@ -512,13 +512,13 @@ class ImageEditor { } show() { this.popup.classList.add("active") - document.addEventListener("keydown", this.keyHandlerBound) - document.addEventListener("keyup", this.keyHandlerBound) + document.addEventListener("keydown", this.keyHandlerBound, true) + document.addEventListener("keyup", this.keyHandlerBound, true) } hide() { this.popup.classList.remove("active") - document.removeEventListener("keydown", this.keyHandlerBound) - document.removeEventListener("keyup", this.keyHandlerBound) + document.removeEventListener("keydown", this.keyHandlerBound, true) + document.removeEventListener("keyup", this.keyHandlerBound, true) } setSize(width, height) { if (width == this.width && height == this.height) {