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:
@@ -3159,6 +3159,9 @@ i.fvtt-hamalron {
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid #444;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
.hamalron-chat-btn {
|
||||
display: flex;
|
||||
@@ -3172,6 +3175,9 @@ i.fvtt-hamalron {
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
pointer-events: auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.hamalron-chat-btn:hover {
|
||||
background: #3a3a6a;
|
||||
|
||||
+9
-5
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -968,6 +968,9 @@
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid #444;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.hamalron-chat-btn {
|
||||
@@ -982,6 +985,9 @@
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
pointer-events: auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
&:hover {
|
||||
background: #3a3a6a;
|
||||
|
||||
Reference in New Issue
Block a user