changing the container label using label.value should work

RESOLVED WONTFIX

Status

()

Core
DOM: Security
P3
normal
RESOLVED WONTFIX
2 years ago
2 years ago

People

(Reporter: baku, Unassigned)

Tracking

(Blocks: 1 bug)

49 Branch
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

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

(Reporter)

Description

2 years ago
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.
(Reporter)

Updated

2 years ago
Summary: awesomebar displaying incorrect text UI for containers → changing the container label using label.value should work

Updated

2 years ago
Priority: P1 → P2
(Reporter)

Comment 1

2 years ago
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)

Updated

2 years ago
Priority: P2 → P3
Whiteboard: [usercontextId], [domsecurity-active] → [usercontextId], [domsecurity-backlog3]
(Reporter)

Comment 3

2 years ago
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)
(Reporter)

Comment 5

2 years ago
Ok, I'll mark as WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.