Closed Bug 1381254 Opened 8 years ago Closed 8 years ago

WebExtension: autofocus attribute does not (always) work in popup

Categories

(WebExtensions :: Frontend, defect)

54 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1324255

People

(Reporter: 5i13ghzt462u, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170613080647 Steps to reproduce: 1. Install the WebExtension Passman https://addons.mozilla.org/en-US/firefox/addon/passman/ 2. Possibly set it up (so you have a master password set) or maybe try to reproduce the issue with the inital popup. Now the actual issue: 1. Open the popup. 2. Close it again. 3. Focus something else on a website (an input field, e.g.) and open the WebExtension popup Actual results: The input field is not focused. The focus is still on the site, at least sometimes. If in step 1 it worked, it certainly won't work in step 3. Expected results: Always autofocus. You do not want your master password to be typed into the main website, but in the add-on's popup. Also seems to affect Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=121006 Ticket tracking issue in Passman: https://github.com/nextcloud/passman-webextension/issues/114
Component: Untriaged → WebExtensions: Frontend
Product: Firefox → Toolkit
BTW, as suggested by @brantje in the Passman issue, you can try to reproduce it with this HTML: <!DOCTYPE html> <html lang="en"> <head> <title>Example</title> <meta charset="UTF-8"> </head> <body> <div id="layout"> <form action="#"> <input type="text" name="test" size="30" autofocus="autofocus"> </form> </div> </body> </html>
There's another bug about the popup always being focused, lets dupe to that.
Flags: needinfo?(mixedpuppy)
I recall testing this. The input element with autofocus does get focus within the document (iirc focusedElement is correct), however the document itself does not get focus when the popup is opened.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.