Closed Bug 1338909 Opened 8 years ago Closed 8 years ago

WebExtension browser_action panel autofocus

Categories

(WebExtensions :: Untriaged, defect)

54 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1324255

People

(Reporter: simon.lydell, Unassigned)

Details

Attachments

(1 file)

Attached file webextension-autofocus.zip (deleted) —
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170211084118 Steps to reproduce: 1. Install the attached test extension. 2. Click the extension's browser_action button, or press Ctrl+Shift+E (_execute_browser_action command added by the extension). Actual results: The browser_action popup opens as expected, but is not focused. Expected results: The browser_action popup opens as expected, and the <input> element inside is focused. This is how it works in Chrome. (Install the test extension and try it!) Chrome extension that uses this feature: Vimium[1] Extra notes: After step 2 or 3, you can press Tab once to focus the panel, and twice to focus the <input> inside. The test extension uses `<input autofocus>`. It should also be possible to focus the input using `.focus()` in JavaScript when the popup opens. web-ext 1.8.1 Firefox Nightly 54.0a1 (2017-02-12) (64-bit) Chromium 55.0.2883.87 Built on Ubuntu , running on Ubuntu 16.04 (64-bit) [1]: https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Yes, let's fix this! Thanks for the detailed STR, hopefully this will be helpful in the other bug. The workaround I use is this in my popup.js file: setTimeout(() => { document.querySelector('body').focus(); }, 100);
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: