Skip to content

Commit 3084fb5

Browse files
committed
Chrome/Edge 135, FF 137
1 parent 5df24cd commit 3084fb5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/org/htmlunit/css/ComputedCssStyleDeclaration.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,10 @@ public String getBackgroundAttachment() {
529529
*/
530530
@Override
531531
public String getBackgroundColor() {
532+
if (!getDomElement().isAttachedToPage()) {
533+
return EMPTY_FINAL;
534+
}
535+
532536
final String value = super.getBackgroundColor();
533537
if (StringUtils.isEmpty(value)) {
534538
return Definition.BACKGROUND_COLOR.getDefaultComputedValue(getBrowserVersion());
@@ -1180,6 +1184,10 @@ public String getWordSpacing() {
11801184
*/
11811185
@Override
11821186
public String getZIndex() {
1187+
if (!getDomElement().isAttachedToPage()) {
1188+
return EMPTY_FINAL;
1189+
}
1190+
11831191
final String response = super.getZIndex();
11841192
if (response.isEmpty()) {
11851193
return AUTO;

0 commit comments

Comments
 (0)