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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>47463</bug_id>
          
          <creation_ts>2010-10-09 22:02:16 -0700</creation_ts>
          <short_desc>autocomplete=off prevents refilling form fields on back/forward navigation</short_desc>
          <delta_ts>2011-02-23 20:37:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>arv</cc>
    
    <cc>beidson</cc>
    
    <cc>jhawkins</cc>
    
    <cc>ojan</cc>
    
    <cc>sullivan</cc>
    
    <cc>tkent</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>292255</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-09 22:02:16 -0700</bug_when>
    <thetext>Steps to reproduce:
1. Go to https://bugs.webkit.org/query.cgi
2. Enter an e-mail address in &quot;Email Addresses and Bug Numbers&quot;, e.g. in &quot;assigned to&quot; field.
3. Press Enter.
4. Press Back.

Results: there is no e-mail address there any more.

I think that this regressed when e-mail address autocompletion was added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>325117</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-12-21 11:50:56 -0800</bug_when>
    <thetext>This is still causing trouble for me, almost daily.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>325415</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-12-22 00:38:04 -0800</bug_when>
    <thetext>Maybe Ojan has some insight into this issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>327559</commentid>
    <comment_count>3</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-12-29 07:31:13 -0800</bug_when>
    <thetext>When you focus an email input field, the JS code sets autocomplete=off to avoid getting the browser built-in dropdown. I just did a quick test, apparently that disables the autofill behavior on back. So, that&apos;s certainly the cause.

Is there another way to disable the browser dropdown? Can&apos;t preventDefault because that would also prevent inserting the character.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>334105</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-01-13 21:38:41 -0800</bug_when>
    <thetext>I don&apos;t know the answer to your question. However,
- is it a bug that autocomplete=off disables restoring form state on back/forward?
- why doesn&apos;t the Bugzilla advanced search page go into b/f cache at least?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>334334</commentid>
    <comment_count>5</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-01-14 09:01:50 -0800</bug_when>
    <thetext>Erik, do you know if there&apos;s a way to make this work, i.e., to avoid the browser dropdown when typing in an input, but keep the autofill behavior when going back?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>335944</commentid>
    <comment_count>6</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2011-01-18 11:13:49 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Erik, do you know if there&apos;s a way to make this work, i.e., to avoid the browser dropdown when typing in an input, but keep the autofill behavior when going back?

I don&apos;t know if there is another way to prevent the drop down but it seems wrong to not restore the input states when going back to a page. I don&apos;t see why autofill should be related to that behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>335953</commentid>
    <comment_count>7</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-01-18 11:22:59 -0800</bug_when>
    <thetext>Sounds like that&apos;s the bug to me. Who knows about form filling that we can CC here to confirm?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>336194</commentid>
    <comment_count>8</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-01-18 16:23:54 -0800</bug_when>
    <thetext>This behavior for autocomplete is a part of fixing Bug 23346.
I don&apos;t remember the specific reason for autocomplete...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350724</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-14 09:57:43 -0800</bug_when>
    <thetext>Could we perhaps remove autocomplete from these fields as a temporary measure?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350731</commentid>
    <comment_count>10</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-02-14 10:08:05 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; I don&apos;t know the answer to your question. However,
&gt; - is it a bug that autocomplete=off disables restoring form state on back/forward?

No, it is not a bug.  It is intentional.  Banks require that autocomplete=off means no form restoration on back/forward.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352647</commentid>
    <comment_count>11</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-17 00:37:26 -0800</bug_when>
    <thetext>(In reply to comment #9)
&gt; Could we perhaps remove autocomplete from these fields as a temporary measure?

You mean turn off email autocomplete entirely or remove the autocomplete property?

If you mean the latter, then it doesn&apos;t work very well because both the custom autocomplete and the browser&apos;s autocomplete menus show up. When the browser&apos;s menu is up, the custom menu doesn&apos;t function.

I see a few options:
1. Go back to using browser extensions to enable autocomplete.
2. Use browser extensions to disable the custom autocomplete.
3. Add a new attribute that disables to browser autocomplete dropdown, but not formfill on page load.

If someone is willing to do the work, 3 seems best since this it&apos;s likely other web developers will want it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352683</commentid>
    <comment_count>12</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-17 01:38:17 -0800</bug_when>
    <thetext>I&apos;ve been thinking of returning to built-in Bugzilla behavior for these two fields only. Personally, I see huge benefit from the new autocomplete when adding people to CC list. In advanced search, I&apos;m more likely to know e-mail address (or a sufficient part of it) for the person upfront.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353388</commentid>
    <comment_count>13</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-17 21:02:20 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; I&apos;ve been thinking of returning to built-in Bugzilla behavior for these two fields only. Personally, I see huge benefit from the new autocomplete when adding people to CC list. In advanced search, I&apos;m more likely to know e-mail address (or a sufficient part of it) for the person upfront.

That certainly doesn&apos;t match my experience, but I don&apos;t feel strongly either way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355372</commentid>
    <comment_count>14</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2011-02-22 10:26:14 -0800</bug_when>
    <thetext>Can we just re-enable autocomplete on form submit?  Here&apos;s an example that turns off autocomplete on focus, but re-enables it on submit.  It seems to remember the form contents when I press back.

http://ponderer.org/tests/form-autocomplete.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355912</commentid>
    <comment_count>15</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-23 00:14:24 -0800</bug_when>
    <thetext>Yeah. That seems to work. So really, we just need to add the following to where we set autocomplete=&quot;off&quot;:
input.form.addEventListener(&quot;submit&quot;, function() {
  	input.setAttribute(&quot;autocomplete&quot;, &quot;on&quot;);
}, false);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355913</commentid>
    <comment_count>16</comment_count>
      <attachid>83454</attachid>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-23 00:21:38 -0800</bug_when>
    <thetext>Created attachment 83454
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356646</commentid>
    <comment_count>17</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-23 20:22:17 -0800</bug_when>
    <thetext>Committed r79515: &lt;http://trac.webkit.org/changeset/79515&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356649</commentid>
    <comment_count>18</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2011-02-23 20:33:26 -0800</bug_when>
    <thetext>Yay, it works!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356651</commentid>
    <comment_count>19</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-02-23 20:37:58 -0800</bug_when>
    <thetext>Thank you thank you thank you!!!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>83454</attachid>
            <date>2011-02-23 00:21:38 -0800</date>
            <delta_ts>2011-02-23 09:46:57 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-47463-20110223192135.patch</filename>
            <type>text/plain</type>
            <size>2062</size>
            <attacher name="Ojan Vafai">ojan</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogNzkzOTkKZGlmZiAtLWdpdCBhL1dlYnNpdGVzL2J1Z3Mud2Vi
a2l0Lm9yZy9DaGFuZ2VMb2cgYi9XZWJzaXRlcy9idWdzLndlYmtpdC5vcmcvQ2hhbmdlTG9nCmlu
ZGV4IGYyODVkN2IzZjk0OTMxYjQ1ZWY5NGY4ODk0NDM5MDIxZjQyN2ZmMDguLjdhZjM1MTU4Y2Rh
YmU5MDhiYjBmM2YwZjNiMmE3ZTlhY2ZmZGI5ZTggMTAwNjQ0Ci0tLSBhL1dlYnN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uYXZpZ2F0aW9uLgorICAgICAgICAgICAgbV9mb2N1c2VkSW5wdXQu
Zm9ybS5hZGRFdmVudExpc3RlbmVyKCJzdWJtaXQiLCBmdW5jdGlvbigpIHsKKyAgICAgICAgICAg
ICAgICBtX2ZvY3VzZWRJbnB1dC5zZXRBdHRyaWJ1dGUoImF1dG9jb21wbGV0ZSIsICJvbiIpOwor
ICAgICAgICAgICAgfSwgZmFsc2UpOwogICAgICAgICB9CiAgICAgICAgIAogICAgICAgICB1cGRh
dGVNZW51KCk7Cg==
</data>
<flag name="review"
          id="75278"
          type_id="1"
          status="+"
          setter="tony"
    />
          </attachment>
      

    </bug>

</bugzilla>