Closed Bug 1964412 Opened 1 year ago Closed 18 days ago

hidden attribute doesn't work as expected for reusable components with a display property set

Categories

(Toolkit :: UI Widgets, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2051196

People

(Reporter: mkennedy, Unassigned)

References

Details

(Whiteboard: [recomp])

Currently if hidden attribute is applied to a reusable component that already has display property set (which is almost all of them), the component will not be visually hidden.

Steps to reproduce

  1. Add a hidden attribute to a reusable component (e.g. <moz-button label="Button" hidden></moz-button>)

Expected Behavior
The component is no longer visible, per hidden attribute spec.

Actual Behavior
The component is still visible.

After discussion, we've decided to add the following CSS at a global level to ensure hidden works as expected.

[hidden] {
  display: none !important;
}

The solution is a universal one and also recommended.

It was noted in the discussion that a part of this work should include checking everywhere and verifying that the solution won't break any previous behavior: e.g. finebar.css

Duplicate of this bug: 1989433
Duplicate of this bug: 2033944
Type: enhancement → defect
Summary: Prevent overriding of hidden attribute on reusable components by default → hidden attribute doesn't work as expected for reusable components with a display property set
Severity: -- → S3
Priority: -- → P2

This has been fixed by the work in Bug 2051196

Status: NEW → RESOLVED
Closed: 18 days ago
Duplicate of bug: 2051196
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.