fix: boutons chat cliquables — insertion dans .sidebar-tab-core + pointer-events auto

- insertion dans .sidebar-tab-core avant .sidebar-tab-scroll
  (respecte la hiérarchie DOM attendue par FVTT v14)
- CSS: pointer-events: auto + position: relative + z-index: 1
- fallback insertion en haut de #chat si selecteurs absents
This commit is contained in:
2026-07-23 22:28:44 +02:00
parent b35b0809d4
commit 0abeff8fce
3 changed files with 21 additions and 5 deletions
+6
View File
@@ -3159,6 +3159,9 @@ i.fvtt-hamalron {
padding: 4px 8px; padding: 4px 8px;
border-bottom: 1px solid #444; border-bottom: 1px solid #444;
flex-wrap: wrap; flex-wrap: wrap;
position: relative;
z-index: 1;
pointer-events: auto;
} }
.hamalron-chat-btn { .hamalron-chat-btn {
display: flex; display: flex;
@@ -3172,6 +3175,9 @@ i.fvtt-hamalron {
cursor: pointer; cursor: pointer;
font-size: 11px; font-size: 11px;
white-space: nowrap; white-space: nowrap;
pointer-events: auto;
position: relative;
z-index: 1;
} }
.hamalron-chat-btn:hover { .hamalron-chat-btn:hover {
background: #3a3a6a; background: #3a3a6a;
+9 -5
View File
@@ -241,12 +241,16 @@ function addChatTools() {
await HamalronTirageTarot.promptEpreuve(actor) await HamalronTirageTarot.promptEpreuve(actor)
}) })
// Insérer en haut de #chat (avant le sidebar-tab-core) // Insérer dans .sidebar-tab-core avant .sidebar-tab-scroll
const firstChild = chatEl.firstElementChild const core = chatEl.querySelector(".sidebar-tab-core")
if (firstChild) { const scroll = core?.querySelector(".sidebar-tab-scroll")
chatEl.insertBefore(tools, firstChild) if (core && scroll) {
core.insertBefore(tools, scroll)
} else { } else {
chatEl.appendChild(tools) // Fallback: en haut de #chat
const firstChild = chatEl.firstElementChild
if (firstChild) chatEl.insertBefore(tools, firstChild)
else chatEl.appendChild(tools)
} }
} }
+6
View File
@@ -968,6 +968,9 @@
padding: 4px 8px; padding: 4px 8px;
border-bottom: 1px solid #444; border-bottom: 1px solid #444;
flex-wrap: wrap; flex-wrap: wrap;
position: relative;
z-index: 1;
pointer-events: auto;
} }
.hamalron-chat-btn { .hamalron-chat-btn {
@@ -982,6 +985,9 @@
cursor: pointer; cursor: pointer;
font-size: 11px; font-size: 11px;
white-space: nowrap; white-space: nowrap;
pointer-events: auto;
position: relative;
z-index: 1;
&:hover { &:hover {
background: #3a3a6a; background: #3a3a6a;