`<datalist>` HTML element should display autocompletion drop-down UI
Categories
(GeckoView :: General, defect, P2)
Tracking
(Webcompat Priority:P2, firefox66 unaffected, firefox67 wontfix, firefox68 wontfix, firefox69 affected)
Webcompat Priority | P2 |
Tracking | Status | |
---|---|---|
firefox66 | --- | unaffected |
firefox67 | --- | wontfix |
firefox68 | --- | wontfix |
firefox69 | --- | affected |
People
(Reporter: phil.mozilla, Assigned: m_kato)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
(Keywords: leave-open, Whiteboard: [geckoview:2022h2?])
Attachments
(5 files)
Steps to Reproduce
- Navigate to https://webxr.sh/dropdowns#datalist.
- Press the <datalist> element (it looks like a default text field).
- When the keyboard appears, type the letters pe.
Observed behavior:
- No dropdown UI appears to show the children of the <datalist> element.
Expected behavior:
- Dropdown UI should display matching elements from datalist, as per e.g. Firefox desktop 66:
Comment 1•6 years ago
|
||
We should fix this for Fenix M4.
Does the datalist dropdown work in Fennec? Is this a regression in GeckoView?
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #1)
We should fix this for Fenix M4.
Does the datalist dropdown work in Fennec? Is this a regression in GeckoView?
Yes, Fennec shows dropdown list, but GV doesn't.
Comment 3•6 years ago
|
||
67=wontfix. Fenix MVP will use GeckoView 68, so we don't need to uplift this fix to 67 Beta.
Assignee | ||
Comment 5•6 years ago
|
||
Fennec uses this method, but GV doesn't use this JSM module.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Assignee | ||
Comment 9•5 years ago
|
||
This is example implementation for GeckoView example.
Depends on D32987
Assignee | ||
Comment 10•5 years ago
|
||
Fennec's auto complete support is implemented by native UI and desktop's one
is into toolkit with original UI.
Since GeckoView doesn't have own Android's layout, we need to expose APIs to
show and hide suggestion list.
onShowAutoCompleteSuggestion
to show suggestion list by<datalist>
. And when updating value of input element or potion of it, this is also calledonHideAutoCompleteSuggestion
to hide this list
When selecting item of list, it has callback interface as AutoCompleteCallback
.
If application wants to set value, call autoComplete
method of this interface.
Assignee | ||
Comment 11•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 12•5 years ago
•
|
||
Fenix MVP is going to release with or without this fix, so it's not technically a Fenix MVP blocker. I'll move this bug to a later Fenix milestone. Makoto says Fennec shows dropdown list, but GV doesn't.
I think we should just have something in PromptDelegate
to handle <datalist>
, similar to what we have for <select>
.
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #13)
I think we should just have something in
PromptDelegate
to handle<datalist>
, similar to what we have for<select>
.
Thanks, I will update it
Comment 15•5 years ago
|
||
I'm editing a bunch of GeckoView bugs. If you'd like to filter all this bugmail, search and destroy emails containing this UUID:
e88a5094-0fc0-4b7c-b7c5-aef00a11dbc9
Updated•5 years ago
|
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Makoto, do you have any idea when the patches for this might land. I notice that they are already a year old. Fenix would like to see this issue resolved.
Assignee | ||
Comment 17•4 years ago
|
||
(In reply to Emily Toop (:fluffyemily) from comment #16)
Makoto, do you have any idea when the patches for this might land. I notice that they are already a year old. Fenix would like to see this issue resolved.
I will try autofill framework based implementation, but I guess that most autofill service may not support this situation... After implanted, I research services.
Comment 18•4 years ago
•
|
||
This is an old bug and the implementation no longer fits the latest GV API.
We have two GV APIs serving autofill/autocomplete situations:
- The Autofill API for integration with Android's AutofillManager.
- The Autocomplete API to expose Gecko autocomplete mechanics.
The datalist
options are best exposed via the Autocomplete API, either as a generic string option (combined with form history later) or as a specific new option type.
We should not introduce a new API for it. Rendering the options should be delegated to the app, as with the rest of the autocomplete elements, for consistency (e.g, autocomplete selections are not going to be positioned relative to the input field).
However, this case differs from the other autocomplete situations since the options are provided by content. We might want to have a default implementation for this in GV in the case when the app doesn't implement the delegate.
Assignee | ||
Comment 19•4 years ago
|
||
Assignee | ||
Comment 20•4 years ago
|
||
(In reply to Eugen Sawin [:esawin] from comment #18)
This is an old bug and the implementation no longer fits the latest GV API.
We have two GV APIs serving autofill/autocomplete situations:
- The Autofill API for integration with Android's AutofillManager.
View.AUTOFILL_TYPE_LIST
won't be supported most autofill services (I cannot find it). When I install custom autofill service using Google's sample + adding View.AUTOFILL_TYPE_LIST
dump, autofill service can recognize it.
Assignee | ||
Comment 21•4 years ago
|
||
We should not introduce a new API for it. Rendering the options should be delegated to the app, as with the rest of the autocomplete elements, for consistency (e.g, autocomplete selections are not going to be positioned relative to the input field).
Hmm, we should port custom element version of popup to GV if we don't add an API?
Comment 22•4 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #21)
We should not introduce a new API for it. Rendering the options should be delegated to the app, as with the rest of the autocomplete elements, for consistency (e.g, autocomplete selections are not going to be positioned relative to the input field).
Hmm, we should port custom element version of popup to GV if we don't add an API?
I've extended the Autocomplete API doc with a selection delegate callback for strings. We should be able to unify all string-based selections like form history and <datalist> with this.
Assignee | ||
Comment 23•4 years ago
|
||
We should not introduce a new API for it. Rendering the options should be delegated to the app, as with the rest of the autocomplete elements, for consistency (e.g, autocomplete selections are not going to be positioned relative to the input field).
Since browser level doesn't scan DOM tree, browser doesn't know suggestions from <datalist>
. So I think that we need any API (previous fix, https://phabricator.services.mozilla.com/D32989 has onShowAutoCompleteSuggestion
etc for it) to show/hide popup or notify browser of suggestions by <datalist>
. from GV. Login data and form history can be fetched from browser's storage (via Firefox sync data) without DOM tree. But <datalist>
's suggestion items are in DOM tree.
Firefox desktop uses custom element to popup items, then popup UX uses XUL element in browser's XUL for popup. But GV doesn't have it, you know. So browser side requires UI implementation like prompt delegate.
I've extended the Autocomplete API doc with a selection delegate callback for strings. We should be able to unify all string-based selections like form history and <datalist> with this.
Gecko's autocomplete code uses index of item to fill item, but it will be OK to set string only. (After implementation is completed, I need some tests for compatibility)
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 24•4 years ago
|
||
Android 11+ has new API for InlineSuggestions (https://developer.android.com/reference/android/view/inputmethod/InlineSuggestion), but no sample and no info except to class.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 25•3 years ago
|
||
I don't know whether this is the right place to ask for that, but in the meantime at firefox for android 88.1.2 the datalist bug is still present.
Is there any chance this issue got fixed?
Updated•3 years ago
|
Comment 26•3 years ago
|
||
setting webcompat priority to P2.
This is a major UI difference with other browsers and right now it is not very intuitive.
Note that chrome displays a drop-down on focus and Firefox nothing (on desktop).
Comment hidden (metoo) |
Comment hidden (metoo) |
Comment hidden (metoo) |
Comment hidden (metoo) |
Comment hidden (metoo) |
Comment hidden (metoo) |
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 35•2 years ago
|
||
The severity field for this bug is set to S4
. However, the following bug duplicate has higher severity:
- Bug 1783594: S3
:m_kato, could you consider increasing the severity of this bug to S3
?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 39•1 year ago
|
||
Although I have WIP, it isn't finished yet.
TODO items are
- We need a delegation implementation for autocomplete popup to Fenix/a-c (I have WIP)
- If Android is newer, we can/may use IME API to add suggestion into software keyboard
- Add autofill hint API (bug 1679248)
Comment 40•5 months ago
|
||
Moving still-reproducing webcompat links to a new knowledge-base issue, bug 1891136.
Comment 41•3 months ago
|
||
The issue is still reproducible based on the webcompat reports:
Environment:
Operating system: OnePlus 6 A6000 (Android 11)
Browsers tested: Firefox Nightly 128.0a1-20240525201917 (Build #2016022983) / Firefox Release 126.0-20240509170740 / Chrome 125.0.6422.72
Note: Note reproducible on Chrome
Updated•1 month ago
|
Updated•1 month ago
|
Description
•