Closed Bug 233639 Opened 21 years ago Closed 19 years ago

xbl constructor isn't called when it is specified attribute hidden="true" or property display: none

Categories

(Core :: XBL, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 188496

People

(Reporter: surkov, Assigned: hyatt)

References

Details

Attachments

(4 files)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

When I specify dipslay: none or hidden="true" on binded element before document
load then constructor will not be called. Nevertheless binding is making i.e. i
can use it properties, methods.
Ok. Let constructor isn't called when element isn't displayed. But constructor
should be called when i'll remove property display: none.

Reproducible: Always
Steps to Reproduce:




I seem this bug is related with http://bugzilla.mozilla.org/show_bug.cgi?id=112520
Attached file testcase
Attached file don't run
Attached file don't run
Related like a duplicate, probably... not marking so since this bug has better
information, clearer testcases, and is in the right component....

That said, a usable testcase (one that points at the CSS and XBL in bugzilla)
would be nice (in general, attaching the auxiliary files first and then
attaching the main testcase pointing at them is the way to go).
Depends on: 112520
(or a single file with embedded XBL)

Like several other bugs, I think this one is mis-summarized. display: none
elements shouldn't have an XBL binding applied at all. We already do this
correctly for <b> below, because b doesn't have a style context. <a> however,
gets the binding applied, which is almost certainly "incorrect", by some
definition of incorrect:

<a style="display:none; -moz-binding: url(foo2)">
  <b style="-moz-binding: url(#foo2)" />
</a>

If you really want <a> to have an XBL binding, it should be visibility:
collapse; instead, which should work correctly with <constructor>s and such.
I agree (or understand) element shouldn't have binding at all when it have 
style display:none. However, such element have binding but it is unimportant. 
The bug lies in constructor will not be called if style dipslay:none of element 
will be changed.
Depends on: 265086
Mozilla 1.8b Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217

now binding is applied even if attribute 'hidden' or style 'display:none' is setted.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Unless you can point out which bug FIXED this, and you should when you mark it
so, this should be WORKSFORME or stay open.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Attached file testcase
This testcase is WFM with current trunk builds.
Fixed by bug 188496.

*** This bug has been marked as a duplicate of 188496 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: