Closed Bug 1404674 Opened 7 years ago Closed 7 years ago

Focus doesn't move to content after clicking Home button with custom web page

Categories

(Firefox :: Address Bar, defect, P1)

x86_64
Windows 7
defect

Tracking

()

VERIFIED FIXED
Firefox 58
Tracking Status
firefox-esr52 --- unaffected
firefox56 --- unaffected
firefox57 --- verified
firefox58 --- verified

People

(Reporter: over68, Assigned: dao)

References

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

1. Set https://www.google.com as home page.
2. Click the home button.
3. Start typing.


Actual results:

Url bar has focus and you start typing in there.


Expected Results:

The search engine box should have focus.
This can't be right, as that changeset affects only Android (and not even the UI at that).
No longer blocks: 1351673
I'm not up-to-date with recent focus changes. Mardak, any idea?
Flags: needinfo?(edilee)
It's on purpose that focus is in the address bar.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(edilee)
Resolution: --- → DUPLICATE
(In reply to Ed Lee :Mardak from comment #4)
> It's on purpose that focus is in the address bar.

That bug seems to be only about about:home, but here the user has set a custom home page (google), thus we are effectively stealing focus from the page. Expected?
Flags: needinfo?(edilee)
Oh oops. I don't think that was explicitly discussed for custom `about:home`s, but I would guess focus should move to content. I do see the problem only if the focus is already in the address bar (or search bar). This was regressed by bug 1399454.

dao, I would guess we need to do some checks not only on new windows but also on "home" button clicks?
Blocks: 1399454
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(edilee) → needinfo?(dao+bmo)
Resolution: DUPLICATE → ---
Summary: The address bar has focus after click the Home button → Focus doesn't move to content after clicking Home button with custom web page
Assignee: nobody → dao+bmo
Status: REOPENED → ASSIGNED
Flags: needinfo?(dao+bmo)
Comment on attachment 8914659 [details]
Bug 1404674 - Clicking the home button should focus the content area.

https://reviewboard.mozilla.org/r/185980/#review191008

I'm a bit reluctant to add more .focus() calls, as each of them triggers a style flush, but I think BrowserGoHome can only be triggered by a user action, and should never happen several times in a row, so I think this is fine here.

If we care about this behavior enough to fix it, should we also add test coverage to prevent future regressions?
Attachment #8914659 - Flags: review?(florian) → review+
Flags: in-testsuite?
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e544746f88e0
Clicking the home button should focus the content area. r=florian
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/e544746f88e0
Status: ASSIGNED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Can this ride the 58 train or should we consider it for backport?
Flags: needinfo?(dao+bmo)
Comment on attachment 8914659 [details]
Bug 1404674 - Clicking the home button should focus the content area.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1399454
[User impact if declined]: focus remains in the address bar when clicking the home button
[Is this code covered by automated tests?]: not yet
[Has the fix been verified in Nightly?]: not yet
[Needs manual test from QE? If yes, steps to reproduce]: 
[List of other uplifts needed for the feature/fix]: /
[Is the change risky?]: no
[Why is the change risky/not risky?]: trivial fix
[String changes made/needed]: /
Flags: needinfo?(dao+bmo)
Attachment #8914659 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Comment on attachment 8914659 [details]
Bug 1404674 - Clicking the home button should focus the content area.

Recent regression, Beta57+
Attachment #8914659 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Reproduced this issue using an affected Nightly build from 2017-09-30 on Win 10.

Verified fixed on latest Nightly 58.0a1 (2017-10-09) and 57.0b6 (20171005195903) across platforms: Win 10, 7, Ubuntu 16.04 x64 and Mac OS X 10.11.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1400409
Blocks: 1449860
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: