Open
Bug 1474641
Opened 7 years ago
Updated 3 years ago
JavaScript focus() method does not work when developer tools are displayed
Categories
(DevTools :: General, defect, P3)
Tracking
(firefox61 affected, firefox62 affected, firefox63 affected)
NEW
People
(Reporter: fady.potter, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180705151535
Steps to reproduce:
Open a page with the focus method in a tab with developer tools.
Example for page code :
<!DOCTYPE html>
<html>
<body>
<input id="inp"></input>
<script>
window.onload=function(){
document.getElementById("inp").focus();
}
</script>
</body>
</html>
Actual results:
The lower command line gets the focus so the code gets override.
Expected results:
The input should get the focus as when the developer tools are not displayed. The user code should get the priority.
Updated•7 years ago
|
status-firefox62:
--- → affected
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Build ID: 20180713100116
I manage to reproduce this issue on Windows 7 x64 and Windows 10 x64 with Firefox Nightly 63.0a1 (2018-07-13) (64-bit).
Status: UNCONFIRMED → NEW
status-firefox61:
--- → affected
status-firefox63:
--- → affected
Component: Untriaged → Layout
Ever confirmed: true
OS: Unspecified → Windows
Product: Firefox → Core
Version: 62 Branch → 63 Branch
Comment 2•7 years ago
|
||
Feels more an issue of devtools, although I have no idea how devtools can avoid doing that... Maybe it can somehow query whether the page has acquired the focus before grabbing it.
Component: Layout → General
Product: Core → DevTools
Updated•7 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•