New issue
Advanced search Search tips

Issue 842486 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Console focus hijacks JavaScript focus()

Reported by thd...@gmail.com, May 13 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. Close the console if it's open.
2. Open test.html.
3. Mouse the mouse cursor on and off the input element. As the mouse leaves the element, it should turn into a button; as the mouse enters the element, it should turn into a text input.
4. Open the console.
5. Click inside the console so that the focus is there.
6. Repeat step 3.

What is the expected behavior?
Step 3 above should continue to work after you focus inside the console.

What went wrong?
Step 3 breaks as soon as the focus is inside the console. It appears once the console has focus, JavaScript's focus() method no longer works as expected. Because elBtn.focus() stops working, the blur event is never triggered again after you put the focus inside the console, that's why the button doesn't turn back into the text input on mouseleave.

Did this work before? N/A 

Chrome version: 66.0.3359.139  Channel: n/a
OS Version: 10.0
Flash Version:
 
test.html
758 bytes View Download
Labels: Needs-Triage-M66

Comment 2 by caseq@chromium.org, May 14 2018

Components: -Platform>DevTools Platform>DevTools>UX
Owner: einbinder@chromium.org
Status: Assigned (was: Unconfirmed)
Status: WontFix (was: Assigned)
This is working as intended. Element.focus() doesn't move OS focus if the page is not focused. The same behavior happens when you hover over the button while your focus is in a separate application.

Sign in to add a comment