Closed Bug 1484989 Opened Last year Closed Last year

Web Console steals focus when link is clicked

Categories

(DevTools :: Console, defect, P1, minor)

63 Branch
defect

Tracking

(firefox-esr60 unaffected, firefox62 disabled, firefox63 disabled, firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- disabled
firefox63 --- disabled
firefox64 --- fixed

People

(Reporter: euthanasia_waltz, Assigned: nchevobbe)

References

Details

(Keywords: regression, Whiteboard: [boogaloo-reserve])

Attachments

(1 file)

STR:
1. Open Web Console as separate window
2. Move focus to main window and click any link (move web page)

ER:
Main window still have focus and is active.

AR:
Web Console steals focus. Since devtools window is activated, I have to activate main window.

workaround:
Check "Persist Logs".

mozregression:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=6cdfa85af851cd124cd535dacd0ce8e4131aeec5&tochange=d01677a667bc35ccd45af746d035d3daa97571ba

So this is caused by bug 1470922 and it is simply change of prefs. (devtools.webconsole.jsterm.codeMirror=false avoids this issue indeed.)

mozregression with devtools.webconsole.jsterm.codeMirror=true (by using user.js):
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=53a3726088f55287efcd48767dd40e1b20404bb3&tochange=e2037d91d4646249a047d70db048bd0a61353ab2
Blocks: 983473
Priority: -- → P3
Whiteboard: [boogaloo-reserve]
Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: P3 → P1
JsTerm's focus function was called in clearOutput, which
we call when navigating to a new page (if Persist Logs is
not checked).
This means that we were forcing the JsTerm to be focused
each time the user navigated while having the console open.
This behavior, can be annoying, or at worst, if you're
debugging a focus issue in your content page, completely maddening.
The fix is striaghtforward: do not call focus in clearOutput.
A test is added to make sure we don't regress this.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/57c85fc5a5bc
Prevent JsTerm to steal focus when reloading a page; r=bgrins.
https://hg.mozilla.org/mozilla-central/rev/57c85fc5a5bc
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Unfortunately, it's too late for Fx63 since we're already building RCs for next week's release.
Oh, per bug 1470922, it's still preffed off for 63 anyway.
Duplicate of this bug: 1487871
You need to log in before you can comment on or make changes to this bug.