<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>9785</bug_id>
          
          <creation_ts>2010-05-21 09:26:28 +0000</creation_ts>
          <short_desc>Add a &quot;filter&quot; attribute. If set, the user agent will filter the datalist. If not, filter won&apos;t be filtered automatically (unless you do some sort of filtering by javascript or/and server-side)</short_desc>
          <delta_ts>2014-09-19 18:35:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-datalist-element</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>35788</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-05-21 09:26:28 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#the-datalist-element

Comment:
Add a &quot;filter&quot; attribute. If set, the user agent will filter the datalist. If
not, filter won&apos;t be filtered automatically (unless you do some sort of
filtering by javascript or/and server-side)

Posted from: 212.170.172.199</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37233</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-08-04 18:36:59 +0000</bug_when>
    <thetext>We ran into this issue too when discussing the firefox implementation of datalist.

Two usage scenarios we could see for &lt;datalist&gt; are:

1.
A static set of completions which the user will usually choose between. For example:

&lt;input list=managers&gt;
&lt;datalist id=managers&gt;
  &lt;option&gt;Sven&lt;/option&gt;
  &lt;option&gt;Agneta&lt;/option&gt;
  &lt;option&gt;Björn&lt;/option&gt;
  &lt;option&gt;Håkan&lt;/option&gt;
  &lt;option&gt;Lisa&lt;/option&gt;
  &lt;option&gt;Anne-Frid&lt;/option&gt;
  &lt;option&gt;Benny&lt;/option&gt;
&lt;/datalist&gt;

2.
A dyanmically populated list based on more complex conditions. Consider for example the google autosuggest feature.

&lt;script&gt;
function handleInput(value) {
  var xhr = new XMLHttpRequest();
  xhr.open(&quot;GET&quot;, &quot;/suggestions.cgi?&quot; + value);
  xhr.send();
  xhr.onload = function() {
    document.getElementById(&quot;suggestions&quot;).innerHTML = xhr.responseText;
  }
}
&lt;/script&gt;
&lt;input list=suggestions oninput=&quot;handleInput(this.value);&quot;&gt;
&lt;datalist id=suggestions&gt;&lt;/datalist&gt;


In use case 1 it makes sense for the UA to only display results that contain (or even starts with) the string that the user has typed so far. In use case 2 it makes sense to display *all* the results that the server cgi script thought were relevant. For example if I type &quot;200 sek&quot; in google, the first result it shows is &quot;200 Swedish kronor = 27.9998 US dollars&quot;.


I suspect that letting the UA apply filtering is a reasonable default. However it would be very good to be able to set a boolean attribute on either the &lt;input&gt; or the &lt;datalist&gt; stating that filtering should not happen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38807</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-10 09:16:36 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale:

Currently the spec doesn&apos;t say if there should be filtering or not — it just says that these are the suggested values and leaves the UI to the UA.

The idea here is to provide a combo box, not to provide a &quot;Google suggest&quot;-like interface. The latter would probably be better handled by a pure JS solution with callbacks.

I would recommend that browser vendors play with offering different attributes (using the vendor-extension syntax!) to experiment with what the best way to extend this feature would be, and report back. We can then update the feature appropriately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40297</commentid>
    <comment_count>3</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2010-09-30 20:50:50 +0000</bug_when>
    <thetext>Gecko has this kind feature implemented (will be in Gecko 2.0/Firefox 4).
Reopening to keep that in mind.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40319</commentid>
    <comment_count>4</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2010-09-30 22:12:27 +0000</bug_when>
    <thetext>This thread describes the current Gecko behavior and why we do that:
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-September/028741.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40518</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-03 18:37:57 +0000</bug_when>
    <thetext>Thanks, I&apos;ll take a look and see if the implementation experience suggests spec changes are needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40973</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-12 06:26:13 +0000</bug_when>
    <thetext>The current situation (a mozNoFilter attribute) seems reasonable for experimentation. Let&apos;s revisit this a few months after this has been shipped widely, and see how people are using it. I think this is definitely an area where we&apos;ll need to add new features to the platform, but I&apos;m not sure it makes sense to do it straight away  we don&apos;t want to go too far down a rabbit hole without the reality check of author usage, the further we go the harder it will be to climb back out, as it were (e.g. we&apos;ll end up with features that are hardly used but used enough to require implementation everywhere, which is a high burden on the platform).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82062</commentid>
    <comment_count>7</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2013-01-24 07:45:20 +0000</bug_when>
    <thetext>This bug was cloned to create HTML WG bug 19025.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94126</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-01 23:01:40 +0000</bug_when>
    <thetext>Anyone know how much usage moznofilter=&quot;&quot; is getting? I&apos;m not seeing any developer chatter about this feature at all in a Google search for it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109309</commentid>
    <comment_count>9</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2014-07-26 10:17:03 +0000</bug_when>
    <thetext>I filed &lt;https://bugzilla.mozilla.org/show_bug.cgi?id=1044407&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109419</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-07-28 21:27:40 +0000</bug_when>
    <thetext>FWIW I examined our internal data and found zero organic uses of moznofilter. (Finding zero uses of anything is actually quite impressive.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111097</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-05 19:49:13 +0000</bug_when>
    <thetext>Given the data above, I think the way to go here is for browsers to always filter unless there&apos;s only a small number of options, in which case not filtering probably makes sense. Maybe we should hard-code that number in the spec? But then again, maybe not? Hard to say.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111820</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-19 18:34:09 +0000</bug_when>
    <thetext>I did what I described in comment 11, and I&apos;m calling it a day for this bug. If there ends up being a need for nofilter beyond that, please do file a new bug (or reopen this one). Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111821</commentid>
    <comment_count>13</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-09-19 18:35:22 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8792.
Check-in comment: Suggest that browsers filter the list=&apos;&apos; suggestions if there&apos;s more than 4 to 7.
https://html5.org/tools/web-apps-tracker?from=8791&amp;to=8792</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>