Closed Bug 1521495 Opened 9 months ago Closed 8 months ago

QuantumBar stops working after entering/exiting customise mode


(Firefox :: Address Bar, defect, P2)






(Reporter: standard8, Assigned: mak)



(Whiteboard: [fxsearch])


  1. Open a new tab, type something, check the bar is working.
  2. Right click on the Toolbar and select Customize
  3. Exit Customize mode

Actual Results

=> Autocomplete stops working (though you can open the popup by pressing the down arrow).

Expected Results

=> The address bar keeps working, autocompletes etc.

Whiteboard: [fxsearch]
Priority: -- → P3

Somehow we don't receive any events from the input field anymore here. So far I have no clue why. Other events still work...

Adding the event listeners on the textbox instead of the input field makes the issue disappear, but this isn't a good solution as some of these events can come from other children of the textbox. We could of course check if event.originalTarget == this.inputField, and then we might have a workable workaround. Before we go down that road I'd really like to understand what exactly is going on here.

I seem to remember with customize mode some elements are removed from the DOM tree and then reinserted, that is likely the same issue we have in Places views forcing us to uninit and create a new view every time we enter and exit customize mode.

I thought so and I made these checks after exiting customize mode:

gURLBar.textbox == document.getElementById("urlbar")
gURLBar.inputField == document.getElementById("urlbar").inputField
gURLBar.editor == document.getElementById("urlbar").editor

They all resolved to true. But now I realize that inputField is a getter that passes through textbox.inputField on the fly rather than keeping a reference to the node. So I think you're right, the binding is reconstructed and we lose the original inputField that we added the event listeners for.

So, for bug 1523332 I need a way to track, destroy and create a new UrlbarInput, at this point we could unify the 2 needs, and just do that, I may take over this and fix it along with that bug.

If you're ok with that, I may take this.

Assignee: nobody → mak77
Depends on: 1523332
Priority: P3 → P2
Duplicate of this bug: 1531339

Fixed by bug 1523332.

Closed: 8 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.