From 6b578012b766834ca38585ac9518b89a15a87352 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 10 Dec 2025 13:28:35 +0100 Subject: [PATCH 1/2] feat: restrict element selection to text elements only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove containers (section, div, article, etc.) from selectable elements - Remove media elements (img, figure, ul, ol, table) from selection - Keep text elements: headings, paragraphs, links, formatting tags - Add figcaption as selectable, remove span 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/App.vue | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/src/App.vue b/src/App.vue index d3b69f8..d18723a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -236,7 +236,7 @@ const clearSelectedPages = () => { selectedPages.value = []; }; -// Content elements that can trigger ElementPopup +// Text elements that can trigger ElementPopup (excluding containers, images, etc.) const CONTENT_ELEMENTS = [ 'P', 'H1', @@ -245,34 +245,17 @@ const CONTENT_ELEMENTS = [ 'H4', 'H5', 'H6', - 'IMG', - 'FIGURE', - 'FIGCAPTION', - 'UL', - 'OL', - 'LI', 'BLOCKQUOTE', - 'PRE', - 'CODE', - 'TABLE', - 'THEAD', - 'TBODY', - 'TR', - 'TH', - 'TD', + 'LI', 'A', - 'SPAN', 'STRONG', 'EM', 'B', 'I', 'U', - 'ARTICLE', - 'SECTION', - 'ASIDE', - 'HEADER', - 'FOOTER', - 'NAV', + 'CODE', + 'PRE', + 'FIGCAPTION', ]; // Check if element is a content element (or find closest content parent) From e4b3188aff7e86932f26ec6ff727f9b77aa61164 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 10 Dec 2025 13:37:55 +0100 Subject: [PATCH 2/2] editor panel : pointer events none when closed --- src/components/editor/EditorPanel.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/editor/EditorPanel.vue b/src/components/editor/EditorPanel.vue index e209215..26a3f2f 100644 --- a/src/components/editor/EditorPanel.vue +++ b/src/components/editor/EditorPanel.vue @@ -34,8 +34,14 @@ @click="activeTab = ''" title="Fermer le panneau" > - - + + @@ -75,6 +81,7 @@ const activeTab = inject('activeTab'); display: flex; flex-direction: column; z-index: 2; + pointer-events: none; } nav { @@ -84,6 +91,7 @@ nav { display: flex; gap: 0.5rem; z-index: 2; + pointer-events: all; } .close-button { @@ -117,7 +125,7 @@ nav { flex: 1; overflow: hidden; position: relative; - left: calc(var(--panel-w)*-1); + left: calc(var(--panel-w) * -1); padding: 4rem 0; @@ -125,6 +133,7 @@ nav { box-shadow: -5px 0px 12px; transition: left 0.3s var(--curve); + pointer-events: all; } .tab-content.open {