Console focus hijacks JavaScript focus()
Reported by
thd...@gmail.com,
May 13 2018
|
|||
Issue descriptionUserAgent: 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:
,
May 14 2018
,
May 29 2018
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 |
|||
Comment 1 by krajshree@chromium.org
, May 14 2018