Closed Bug 1487871 Opened 6 years ago Closed 5 years ago

Console steals focus from other Firefox windows when page reloads

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1484989

People

(Reporter: nika, Unassigned)

Details

User Story

The console should only steal the focus when the user opens it.
On page reload, if the console is already open, we should not prevent the page behavior.

Example: 
- Go to `data:text/html,<meta charset=utf8><input autoFocus>`
- Open the console (focus is put on the input)
- Reload the page

Expected result: The content page input is focused (due to its autoFocus attribute)

Actual result: The console input keep/steal the focus
If the console is open on a glitch.me document in a different window while that page is being edited, it steals the focus whenever the page reloads due to a change.
User Story: (updated)
Priority: -- → P2
This is also highly disruptive when trying to run some tests that require document focus—I can't look at console output and run the tests at the same time, because when I refresh the focus goes back to the devtools.

I think a good general principle for focus is to, unless there's a really good reason to move it, leave it where the user last put it, and I don't see why the devtools should violate that.
The original test case seems to be fixed in Nightly (due to Bug 1484989).

Nika, Marijn, are you experiencing this bug on Nightly ? If so, could you hand me a STR so I can have a look before the 65 cycle is over? Thanks!
Flags: needinfo?(nika)
Flags: needinfo?(marijnh)
I've only got version 63 around. I didn't see Bug 1484989 yet — if that fixes it in nightly that's wonderful!
Flags: needinfo?(marijnh)
I'm going to close this as dupe of Bug 1484989 for now, but feel free to reopen it if there's still issue with the console and focus.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(nika)
You need to log in before you can comment on or make changes to this bug.