Closed Bug 1485307 Opened 6 years ago Closed 6 years ago

Opening a new tab with an extension doesn't focus the address bar if the new tab is overwritten

Categories

(WebExtensions :: Frontend, defect, P1)

defect

Tracking

(firefox-esr60 unaffected, firefox62 unaffected, firefox63+ fixed, firefox64 verified)

VERIFIED FIXED
mozilla64
Iteration:
64.2 - Sep 28
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 + fixed
firefox64 --- verified

People

(Reporter: altech123159, Assigned: robwu)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180821220101

Steps to reproduce:

1. Installed TreeStyleTab (https://addons.mozilla.org/it/firefox/addon/tree-style-tab/)
2. Installed New Tab Tools (https://addons.mozilla.org/it/firefox/addon/new-tab-tools/)
3. Open a new tab using the + button in the TreeStyleTab sidebar


Actual results:

The address bar in the new tab is not focused


Expected results:

The address bar in the new tab should be focused
In firefox stable it work as expected, it stopped working in nightly some day ago
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
20180821220101

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=e17409c5199c0ade0de9899782d6a9f5f4970871&tochange=6f3907a1da34a62133832dc981e9005ee30e9388
Blocks: 1362034
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Address Bar
Ever confirmed: true
Flags: needinfo?(jkt)
Keywords: regression
I can repro with the new tab button for multi account containers also.
Flags: needinfo?(jkt)
Assignee: nobody → jkt
I can repro with CTRL-T using Temporary Containers addon.
Status: NEW → ASSIGNED
Nightly Build ID 20180824100112 - Also happening in Containers on the Go. Using ALT + C or clicking its menu item ("+" icon).
Reproduces in Private Browsing Mode in all the above instances too.
Holding down the new tab icon (which opens the containers menu) then selecting a container DOES NOT reproduce the bug.

Additional observations in a fresh Nightly profile. 
CTRL + . then arrow keys to container also reproduces this no address focus.
Holding down the new tab icon (which opens the containers menu) then selecting a container DOES NOT reproduce the bug.

Testing in a fresh profile in Beta Build 20180510160705 - this is not reproducing.
Priority: -- → P1
I can repro with the new tab button and CTRL-T using the Conex addon.
jkt, your change caused the tab to always initialize to the default URL:
https://searchfox.org/mozilla-central/rev/99cbc0aec3e1c0b65ff9052523fb5c181b248f57/browser/components/extensions/parent/ext-tabs.js#568-570

Whereas the tab focusing logic expects an empty URL:
https://searchfox.org/mozilla-central/rev/99cbc0aec3e1c0b65ff9052523fb5c181b248f57/browser/components/extensions/parent/ext-tabs.js#640-642

Taking over since I've been looking into a related bug.
Assignee: jkt → rob
Component: Address Bar → Frontend
Product: Firefox → WebExtensions
See Also: → 1488914
See Also: 1488914
Comment on attachment 9009591 [details]
Bug 1485307 - Focus urlbar when extension opens new tab

Luca Greco [:rpl] has approved the revision.
Attachment #9009591 - Flags: review+
Tracking for 63 as this regression affects extensions with a sizable user base. We'll probably want an uplift to beta.
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/0ac2987bd1b0
Focus urlbar when extension opens new tab r=rpl
https://hg.mozilla.org/mozilla-central/rev/0ac2987bd1b0
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment on attachment 9009591 [details]
Bug 1485307 - Focus urlbar when extension opens new tab

Approval Request Comment
[Feature/Bug causing the regression]: bug 1362034
[User impact if declined]: Urlbar of extension-created new tabs are not focused by default.
[Is this code covered by automated tests?]: Yes. An existing test was modified to fail without the fix, and passes with the fix.
[Has the fix been verified in Nightly?]: No.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: N/A.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: One-line fix in extension API code, plus tests.
[String changes made/needed]: No.
Attachment #9009591 - Flags: approval-mozilla-beta?
Comment on attachment 9009591 [details]
Bug 1485307 - Focus urlbar when extension opens new tab

Fix for a regression on a tracked bug, uplift approved for 63 beta 8, thanks.
Attachment #9009591 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified using Nightly 64.0a1 (2018-09-21) running on Windows 10 x64 and MacOS X, cannot reproduce the issue on this build, it did reproduce on the previous one, so the problem appears to be fixed.
Status: RESOLVED → VERIFIED
Iteration: --- → 64.2 (Sep 28)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: