Closed Bug 1367012 Opened 6 years ago Closed 6 years ago

Update updateEditUIVisibility for Photon edit controls


(Firefox :: Toolbars and Customization, enhancement, P1)

53 Branch



Firefox 55
55.7 - Jun 12
Tracking Status
firefox55 --- fixed
firefox56 --- verified


(Reporter: Gijs, Assigned: Gijs)



(Whiteboard: [photon-structure])


(1 file)

I missed this in the review for bug 1354108, but we should update the updateEditUIVisibility function ( ) and any related tests now that we have edit controls in the Photon panel.
Flags: qe-verify+
Priority: -- → P2
Whiteboard: [photon-structure] → [photon-structure] [triage]
Whiteboard: [photon-structure] [triage] → [photon-structure]
Assignee: nobody → gijskruitbosch+bugs
Iteration: --- → 55.7 - Jun 12
Priority: P2 → P1
Attachment #8875666 - Flags: review?(mdeboer)
Sorry, I just realized this isn't ready for review yet.
Comment on attachment 8875666 [details]
Bug 1367012 - update edit UI visibility checks for photon,

Thanks for this! This must've been a bit more work than expected.

::: browser/components/customizableui/CustomizableUI.jsm:4164
(Diff revision 2)
>        let mainViewId = this._panel.querySelector("panelmultiview").getAttribute("mainViewId");
>        let mainView = doc.getElementById(mainViewId);
>        let contextMenu = doc.getElementById(mainView.getAttribute("context"));
>        gELS.addSystemEventListener(contextMenu, "command", this, true);
>        let anchor = doc.getAnonymousElementByAttribute(this._chevron, "class", "toolbarbutton-icon");
> +      this._panel.addEventListener("popupshowing", () => doc.defaultView.updateEditUIVisibility(), {once: true});

Can you add a one-line comment here to explain why this is here? Just so others will remember it too, later :)
Attachment #8875666 - Flags: review?(mdeboer) → review+
Pushed by
update edit UI visibility checks for photon, r=mikedeboer
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Hey Gijs, any suggested STR to be able to verify this? Thanks!
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Grover Wimberly IV [:Grover-QA] from comment #8)
> Hey Gijs, any suggested STR to be able to verify this? Thanks!

Open Firefox, open customize mode, move the edit controls to the navbar.

Check they get disabled/enabled correctly based on whether you have text selected and/or focus is in an input field and/or there is stuff on the clipboard.
Then make the window narrow so they go into the dynamic portion of the overflow panel, and check the same.
Then right click the controls, use "pin to overflow menu" to put them in the permanent bit, and check that they still update correctly.

If anything seems off, compare with behaviour on release with the buttons in the overflow panel and/or hamburger panel (instead of permanent overflow panel).

Does that work? :-)
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(gwimberly)
Thanks, Gijs!

Verified on Windows, Mac, and Ubuntu.
Flags: qe-verify+
Flags: needinfo?(gwimberly)
Blocks: 1387512
You need to log in before you can comment on or make changes to this bug.