Closed
Bug 708397
Opened 11 years ago
Closed 11 years ago
"addon-options-displayed" notification fires before XBL bindings apply
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: ecfbugzilla, Assigned: darktrojan)
References
Details
Attachments
(1 file)
5.29 KB,
patch
|
Unfocused
:
review+
|
Details | Diff | Splinter Review |
I have a boolean setting that isn't bound to a pref and is initialized "manually": <setting id="foo" type="bool" title="Foo"/> I tried setting document.getElementById("foo").value when handling "addon-options-displayed" notification and noticed that it has no effect. In fact, the value property is completely broken after that. Eventually I figured out that "addon-options-displayed" is fired before XBL bindings apply - meaning before the value property is defined. Setting it at that point masks getter and setter on the prototype that are added later. Clearly, this notification should fire when the UI is fully initialized (as happening in Fennec right now). For reference, on XBL bindings not applying synchronously: bug 407311. Tested in 20111207 nightly build on Windows 7 x64.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•11 years ago
|
||
I suspect I'll get told off for using .clientTop in product code, but I see no way around it.
Attachment #580563 -
Flags: review?(bmcbride)
Comment 2•11 years ago
|
||
Comment on attachment 580563 [details] [diff] [review] patch Review of attachment 580563 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Geoff Lankow (:darktrojan) from comment #1) > I suspect I'll get told off for using .clientTop in product code, but I see > no way around it. Certainly not the only time this hack has been used.
Attachment #580563 -
Flags: review?(bmcbride) → review+
Comment 3•11 years ago
|
||
Comment on attachment 580563 [details] [diff] [review] patch Review of attachment 580563 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/extensions/content/extensions.js @@ +2914,5 @@ > + if (gViewController.viewPort.selectedPanel.hasAttribute("loading")) { > + gDetailView.node.addEventListener("ViewChanged", function viewChangedEventListener() { > + gDetailView.node.removeEventListener("ViewChanged", viewChangedEventListener, false); > + if (firstSetting) > + firstSetting.clientTop; Would be good to have a comment here. @@ +2919,5 @@ > + Services.obs.notifyObservers(document, "addon-options-displayed", gDetailView._addon.id); > + }, false); > + } else { > + if (firstSetting) > + firstSetting.clientTop; And here.
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4b71b1e9cc0c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•