From 818375c57f280b7bf6fd2cd20b4bf58bc849a0fe Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 17 Dec 2021 09:56:22 +0100 Subject: [PATCH] ui: prevent conflicting alt key binding --- src/client/ui/ui-dragresize.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/ui/ui-dragresize.js b/src/client/ui/ui-dragresize.js index 70c425b4..ee624325 100644 --- a/src/client/ui/ui-dragresize.js +++ b/src/client/ui/ui-dragresize.js @@ -111,14 +111,16 @@ class UiDragResize extends UiWidget { keyboardJS.withContext('editing', ()=>{ keyboardJS.bind('alt', (e)=>{ - this.handles[0].classList.add('full') + if (e.target.tagName !== 'TEXTAREA') this.handles[0].classList.add('full') }, (e)=>{ - this.handles[0].classList.remove('full') + if (e.target.tagName !== 'TEXTAREA') this.handles[0].classList.remove('full') }) keyboardJS.bind('alt+c', (e)=>{ + if (e.target.tagName === 'TEXTAREA') return this.copying = true this.container.classList.add('copying') }, (e)=>{ + if (e.target.tagName === 'TEXTAREA') return this.copying = false this.container.classList.remove('copying') })