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
+9 -5
View File
@@ -241,12 +241,16 @@ function addChatTools() {
await HamalronTirageTarot.promptEpreuve(actor)
})
// Insérer en haut de #chat (avant le sidebar-tab-core)
const firstChild = chatEl.firstElementChild
if (firstChild) {
chatEl.insertBefore(tools, firstChild)
// Insérer dans .sidebar-tab-core avant .sidebar-tab-scroll
const core = chatEl.querySelector(".sidebar-tab-core")
const scroll = core?.querySelector(".sidebar-tab-scroll")
if (core && scroll) {
core.insertBefore(tools, scroll)
} else {
chatEl.appendChild(tools)
// Fallback: en haut de #chat
const firstChild = chatEl.firstElementChild
if (firstChild) chatEl.insertBefore(tools, firstChild)
else chatEl.appendChild(tools)
}
}