From 4c7d9aced909b3371813a5d26a328d23937d6853 Mon Sep 17 00:00:00 2001 From: mic Date: Thu, 15 Aug 2024 00:28:47 +0200 Subject: [PATCH] the selection helper is not selecting in our bottom div, but only in the chatgpt part of the window. see #104 --- js/mzta-chatgpt.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index 26473af4..b39ff617 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -417,6 +417,13 @@ function selectContentOnMouseMove(event) { } function selectContentOnMouseUp(event) { + var excludedArea = document.querySelector('.mzta-header-fixed'); + + if (excludedArea && excludedArea.contains(event.target)) { + // If the click was inside the excluded area, do nothing + return; + } + if ((!isDragging)&&(!isSomethingSelected())) { // If no dragging has occurred, execute the selection code selectContentOnClick(event);