Closed
Bug 1342708
Opened 7 years ago
Closed 7 years ago
webextension browser frames missing autocompletepopup (datalist, etc)
Categories
(WebExtensions :: Frontend, defect, P2)
WebExtensions
Frontend
Tracking
(firefox54 wontfix, firefox55 fixed)
RESOLVED
FIXED
mozilla55
webextensions | + |
People
(Reporter: callahad, Assigned: mixedpuppy)
References
(Blocks 2 open bugs)
Details
(Keywords: DevAdvocacy, Whiteboard: [parity-chrome], triaged)
Attachments
(2 files)
In browser_action popups, input elements with associated datalists do not provide automatic completion. See screenshot. STR: 1. Clone and check out revision 6031ac56f7a462f3a35fe412e49e45dcfa88b329 of https://github.com/callahad/quick-accept-language-switcher 2. Load it as a temporary / unpacked add-on 3. Click the add-on's icon and type "en" What should happen: - Completions of "en", "en-au", "en-ca", etc. should appear What actually happens: - No completions are shown The exact same code, run in web content, works as expected: https://jsfiddle.net/5f0rq05r/
Updated•7 years ago
|
Priority: -- → P2
Whiteboard: [parity-chrome] → [parity-chrome], triaged
Comment 1•7 years ago
|
||
I looked into this, to see if it might be similar to bug 1269421, just a matter of wiring the right attribute on the browser ("autocompletepopup" I believe), but that doesn't seem enough. This might be either a platform limitation (nested popups), or some other part of wiring missing on our end, but I'm not familiar enough to know where to look next. Still, I'd be happy to if someone can point me in a direction.
Updated•7 years ago
|
webextensions: --- → ?
Updated•7 years ago
|
Assignee: nobody → mixedpuppy
webextensions: ? → +
Assignee | ||
Comment 2•7 years ago
|
||
This should be fixed by setting the context attribute on the browser to contentAreaContextMenu. https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/ExtensionPopups.jsm#227 We may also have to make sure content.js is loaded.
Assignee | ||
Comment 3•7 years ago
|
||
BTW, we had this issue in socialapi, bug 805227, which was fixed in bug 782850, the basics of which is setting the context attribute.
Assignee | ||
Comment 4•7 years ago
|
||
eh, I was wrong. context does fix of course the context menu, which fixes using other things (spell check), but not the datalist which as zombie pointed out is autocompletepopup.
Assignee | ||
Comment 5•7 years ago
|
||
AutoCompletePopup.jsm purposely ignores any non-tabbrowser browser. https://dxr.mozilla.org/mozilla-central/source/toolkit/components/satchel/AutoCompletePopup.jsm#148 Removing that code makes this work in the sidebar, however it still is not working in popups (e.g. browserAction). This also requires loading the content.js frame script, which is happening for the popups in bug 1299371. content.js initializes AutoCompletePopup.jsm.
Depends on: 1299371
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•7 years ago
|
||
Comment on attachment 8853579 [details] Bug 1342708 fix datalist failure in webext popups, The changes in browser-content.js are necessary only for browserAction and seem necessary due to the preload mechanism. formfill is connected during preload, but then disconnected prior to popup opening. We do not receive DOMContentLoaded during the browserAction popup opening.
Attachment #8853579 -
Attachment description: Bug 1342708 WIP exploring datalist failure in webext popups → Bug 1342708 fix autocompletepopup in sidebar and browseraction
Attachment #8853579 -
Flags: feedback?(kmaglione+bmo)
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8853579 [details] Bug 1342708 fix datalist failure in webext popups, https://reviewboard.mozilla.org/r/125640/#review133518 ::: toolkit/components/satchel/AutoCompletePopup.jsm:149 (Diff revision 2) > return; > } > > let window = browser.ownerGlobal; > - let tabbrowser = window.gBrowser; > - if (Services.focus.activeWindow != window || > + // Also check parent in case this is a sidebar. > + if (![window, window.parent].includes(Services.focus.activeWindow)) { Just check `window.top`. ::: toolkit/content/browser-content.js:1459 (Diff revision 2) > "FormAutoComplete:RequestFocus", > ], > > init() { > addEventListener("unload", this); > + if (!content.document.readyState == "complete") { `readyState != "complete"`. `false` will never equal "complete".
Updated•7 years ago
|
Attachment #8853579 -
Flags: feedback?(kmaglione+bmo) → feedback+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Summary: Datalist completions do not display in WebExtension popups → webextension browser frames missing autocompletepopup (datalist, etc)
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8853579 [details] Bug 1342708 fix datalist failure in webext popups, https://reviewboard.mozilla.org/r/125640/#review147154
Attachment #8853579 -
Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 15•7 years ago
|
||
Pushed by mixedpuppy@gmail.com: https://hg.mozilla.org/integration/autoland/rev/937da0dba852 fix datalist failure in webext popups, r=kmag
Comment 16•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/937da0dba852
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 17•7 years ago
|
||
54 RC build is released. Mark 54 won't fix.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•