When click to open addon's popup the input field that have to focus sometimes doesn't get the focus
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: chris_bestas, Unassigned)
References
Details
Attachments
(2 files)
Steps to reproduce:
load the add on in the attached file. When clik the icon to open the popub, the input field don't take always the focus, as it should be.
Actual results:
So, if press the tab key the input field get the focus, but if move the mouse the field loose the focus again. I set a shortcut key compination to open the addon's popup and all times i use it the field is focusing. The problem exist when open the popub by clicking the icon.
Expected results:
The input field with id "aanum" in the example, should get focus after opening the popup.
Reporter | ||
Updated•2 years ago
|
![]() |
||
Updated•2 years ago
|
Comment 1•1 years ago
|
||
Works for me on Nightly on Ubuntu running in Wayland mode on Wayland.
Reporter, does the bug reproduce on Nightly for you? On which platform?
Reporter | ||
Comment 2•1 years ago
|
||
Tested on Windows 10 and Windows 11 and has the same problem. As I mentioned sometimes it focuses and sometimes it doesn't.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
The bug is 100% there, it's just harder to reproduce, since trying it more just makes it cached more and the race condition will almost never happen.
BUT! If you open another addon popup first, then there is much bigger chance to reproduce it.
See the video where clicking to Auto Highlight addon first, will almost always cause the Send Note to Device to not focus the input.
This bug is here for years, and it was fixed already few years back:
https://bugzilla.mozilla.org/show_bug.cgi?id=1324255
Comment 4•3 months ago
|
||
I just wanted to add that I have run into this issue with 2 of my Firefox addons trying to use "autofocus" on a specific input element.
Discussion of this including screenshots and videos: https://discourse.mozilla.org/t/use-of-autofocus-in-popup-html-not-consistent/143017
Description
•