Fix pause overlay showing GAME PAUSED while unpaused — v2.0.5
Root cause of the toggle cycle bug: the theme set display:flex on #pause.dg2-pause unconditionally, out-specificity-ing core's hidden (unpaused) state. After unpausing, the pause element stayed visible and showed Foundry's default GAME PAUSED markup (the overlay injector correctly skips unpaused renders). Scope the flex layout to #pause.dg2-pause.paused and explicitly hide :not(.paused). Verified three full pause/unpause cycles: paused = radar scope visible, unpaused = element hidden. (Earlier tests misread visibility via offsetParent, which is always null for position:fixed elements.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -539,12 +539,21 @@
|
||||
|
||||
#pause.dg2-pause {
|
||||
background: none;
|
||||
}
|
||||
|
||||
/* Layout ONLY while actually paused - never override Foundry's hidden
|
||||
(unpaused) state, or the stock GAME PAUSED markup shows after unpausing. */
|
||||
#pause.dg2-pause.paused {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
#pause.dg2-pause:not(.paused) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#pause.dg2-pause img { display: none; }
|
||||
|
||||
.dg2-pause-scope {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
"discord": "jalensailin"
|
||||
}
|
||||
],
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"verified": "14",
|
||||
|
||||
Reference in New Issue
Block a user