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

VERIFIED FIXED in Firefox 63

Status

P1
normal
VERIFIED FIXED
7 months ago
6 months ago

People

(Reporter: altech123159, Assigned: robwu)

Tracking

({regression})

Trunk
mozilla64
regression

Firefox Tracking Flags

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

Details

Attachments

(1 attachment)

(Reporter)

Description

7 months ago
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

Comment 1

7 months ago
regression-window
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

Comment 3

7 months ago
I can repro with CTRL-T using Temporary Containers addon.

Updated

7 months ago
Duplicate of this bug: 1485308

Updated

7 months ago
Status: NEW → ASSIGNED

Comment 5

7 months ago
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.

Updated

7 months ago
Priority: -- → P1

Updated

7 months ago
Duplicate of this bug: 1490243

Updated

7 months ago
Duplicate of this bug: 1490053

Comment 8

7 months ago
I can repro with the new tab button and CTRL-T using the Conex addon.
(Assignee)

Comment 9

6 months ago
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
status-firefox62: --- → unaffected
status-firefox63: --- → affected
status-firefox64: --- → affected
status-firefox-esr60: --- → unaffected
Component: Address Bar → Frontend
Product: Firefox → WebExtensions
(Assignee)

Updated

6 months ago
See Also: → bug 1488914
(Assignee)

Updated

6 months ago
See Also: bug 1488914

Comment 12

6 months ago
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.
tracking-firefox63: --- → +

Comment 14

6 months ago
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/0ac2987bd1b0
Focus urlbar when extension opens new tab r=rpl

Comment 15

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0ac2987bd1b0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox64: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
(Assignee)

Comment 16

6 months ago
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+

Comment 18

6 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/17ab3c3b1256
status-firefox63: affected → fixed

Comment 19

6 months ago
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
status-firefox64: fixed → verified
(Assignee)

Updated

6 months ago
Iteration: --- → 64.2 (Sep 28)
You need to log in before you can comment on or make changes to this bug.