From 5ff44bbae810e9194765998865440252377190ad Mon Sep 17 00:00:00 2001 From: si458 Date: Sat, 28 Sep 2024 14:29:17 +0100 Subject: [PATCH] fix DeskTools only dragging one way #6257 Signed-off-by: si458 --- views/default.handlebars | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index a5463146..91030485 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -10298,10 +10298,20 @@ } }); Q('DeskTools').addEventListener('mousedown', function (event) { - if (Q('DeskTools').style.cursor === 'col-resize') deskTools.resizing = true; + if (Q('DeskTools').style.cursor === 'col-resize') { + deskTools.resizing = true; + Q('Desk').removeAttribute('onmouseup'); + Q('Desk').removeAttribute('onmousedown'); + Q('Desk').removeAttribute('onmousemove'); + } }); document.addEventListener('mouseup', function () { - if(deskTools.resizing===true && Q('DeskTools').style.cursor === 'col-resize') deskTools.resizing = false; + if(deskTools.resizing === true && Q('DeskTools').style.cursor === 'col-resize') { + deskTools.resizing = false; + Q('Desk').setAttribute('onmouseup','dmouseup(event)'); + Q('Desk').setAttribute('onmousedown','dmousedown(event)'); + Q('Desk').setAttribute('onmousemove','dmousemove(event)'); + } }); document.addEventListener('mousemove', function (event) { if (deskTools.resizing) {