Closed Bug 1279271 Opened 8 years ago Closed 8 years ago

changing the container label using label.value should work

Categories

(Core :: DOM: Security, defect, P3)

49 Branch
x86
macOS
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: baku, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [usercontextId], [domsecurity-backlog3])

The way we fixed bug 1279140 is to use setAttribute("value", ...) instead label.value.
But label.value should work. This bug is a follow up to make label.value to work.
Summary: awesomebar displaying incorrect text UI for containers → changing the container label using label.value should work
Priority: P1 → P2
The reason why it doesn't work is that the XBL methods are not available immediately after the creation of the element.
the setter of the 'value' property is not called because it's too early.
Wontfix?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Andrea Marchesini (:baku) from comment #1)
> The reason why it doesn't work is that the XBL methods are not available
> immediately after the creation of the element.
> the setter of the 'value' property is not called because it's too early.
> Wontfix?

Does forcing a reflow here work?
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(amarchesini)
Priority: P2 → P3
Whiteboard: [usercontextId], [domsecurity-active] → [usercontextId], [domsecurity-backlog3]
Gijs, what do you mean with forcing a reflow?
Flags: needinfo?(amarchesini) → needinfo?(gijskruitbosch+bugs)
(In reply to Andrea Marchesini [:baku] from comment #3)
> Gijs, what do you mean with forcing a reflow?

Make sure the element is in the document (not just created and never appended/inserted into the doc) and that the binding has been attached. For the latter, sometimes you need to kick the tires of layout, e.g. by asking for something from getComputedStyle, the element's offsetHeight, whatever.

Really, if the attribute setting works then it might not be worth spending time on this. Up to you.
Flags: needinfo?(gijskruitbosch+bugs)
Ok, I'll mark as WONTFIX.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.