Closed Bug 1604798 Opened 4 years ago Closed 4 years ago

Quantumbar remains expanded in customize mode

Categories

(Firefox :: Address Bar, defect, P2)

defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 74
Iteration:
74.1 - Jan 6 - Jan 19
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- unaffected
firefox72 --- unaffected
firefox73 --- disabled
firefox74 --- verified

People

(Reporter: ccomorasu, Assigned: bugzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Affected versions

  • Fx 73.0a1

Affected platforms

  • Windows 10 x64

Steps to reproduce

  1. Launch Firefox.
  2. From about:newtab select Youtube.
  3. Select the address bar in order to expand it.
  4. From the hamburger menu select "Customize..."

Expected result

  • In the customize menu the address bar is no longer expanded.

Actual result

  • In the customize menu the address bar is expanded.

Regression range

  • This is not a regression.

Additional notes

Has Regression Range: --- → no
Has STR: --- → yes

I can't seem to reproduce this on Ubuntu.

OS: All → Windows 10
Priority: -- → P2

I reproduced it on both Ubuntu and macOS.

I have to open the customize view twice to reproduce. STR:

  1. Click on the address bar to expand it.
  2. Open Customize View from the hamburger menu. The address bar is the expected size in Customize View.
  3. Exit Customize View.
  4. Open Customize View from the hamburger menu.

Observe that the address bar is expanded. Once Customize View is exited, the address bar can't be un-expanded by clicking on page content. To un-expand, it needs to be clicked on again then page content must be clicked.

When customize view is opened the first time, the expanded Urlbar is collapsed from the _on_blur event. When customize view is exited, the Urlbar is expanded from the _on_focus event but then the Urlbar quickly loses its focus, but seemingly not from the _on_blur event. This puts us in an unexpected state: the Urlbar is expanded but it is not focused. This causes the subsequent problems with customize mode and not being able to collapse the Urlbar.

I'm looking into why the Urlbar is focused but then quickly loses focus without blurring/collapsing when customize mode is exited. This appears to be an older regression: the same thing happens on Release 70. It's less noticeable since the Urlbar does not expand.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

(In reply to Harry Twyford [:harry] from comment #4)

I'm looking into why the Urlbar is focused but then quickly loses focus without blurring/collapsing when customize mode is exited. This appears to be an older regression: the same thing happens on Release 70. It's less noticeable since the Urlbar does not expand.

Focus is probably lost here: https://searchfox.org/mozilla-central/rev/4537228c0a18bc0ebba2eb7f5cbebb6ea9ab211c/browser/base/content/browser-customization.js#63

But I have no clue why there wouldn't be a blur event.

Summary: Quantumbar design update remains expanded in the customize menu → Quantumbar remains expanded in customize mode
OS: Windows 10 → All
Version: 73 Branch → Trunk

focusAndSelectUrlbar can fire after isCustomizing() is false but before customizeMode is fully exited. This means the Urlbar is refocused but then quickly loses focus after the main browser window is focused. By adding this additional check we can be sure that the browser focus event occurs before the Urlbar is refocused.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED

The fix is simple here, but the investigation took quite a while so I'm assigning this 2 points.

Iteration: --- → 74.1 - Jan 6 - Jan 19
Points: --- → 2
Depends on: 1560348
Attachment #9120465 - Attachment is obsolete: true

I had to minimize the changes in bug 1560348's patch and in its current form it won't fix this bug, so I think we need to go back to your patch here.

No longer depends on: 1560348
Flags: needinfo?(htwyford)
See Also: → 1609686

(In reply to Dão Gottwald [::dao] from comment #9)

I had to minimize the changes in bug 1560348's patch and in its current form it won't fix this bug, so I think we need to go back to your patch here.

Alternatively we could fix bug 1609686.

Seeing as the patch in this bug is already complete, I don't think it hurts to land it to get this issue fixed ASAP. That way there's less pressure to get bug 1609686 fixed right away. That said, I agree that bug 1609686 is certainly a more robust fix and should be worked on eventually.

Flags: needinfo?(htwyford)
Attachment #9120465 - Attachment is obsolete: false
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/901c87409ab4
Re-focus Urlbar more reliably after exiting customize mode. r=dao
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

I can confirm this fix.
I verified using Fx 74.0a1 (2020-01-20) on Windows 10 x64, Ubuntu 18.04 and macOS 10.14.

Status: RESOLVED → VERIFIED
Regressed by: urlbar-update-1
You need to log in before you can comment on or make changes to this bug.