Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Judging from this <a href="http://www.google.com/support/forum/p/Toolbar/thread?tid=7dcddc95f43dac19&amp;hl=en" rel="nofollow noreferrer">google toolbar support thread</a>, it seems autofill is not only a huge PITA for developers, but also very difficult to turn off. As of Aug 09 google claims it will honor the <code>autocomplete="off"</code> attribute on the containing <code>form</code> but as of today this feature does not seem to be released yet.</p> <p>You used to be able to give your input elements non-sensical names (eg <code>name="xx_Address_32423423"</code>) to confuse autofill (and thereby effectively disable it), but they've made autofill more "intelligent" by looking at <em>substrings</em> within your element names in order to determine if the field can be autofilled or not (again, judging from complaints in that thread).</p> <p>In your case, you may as well roll with the punches and find an equivalent for <code>onpropertychange</code> for Firefox. Have a look at the <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents" rel="nofollow noreferrer"><code>DOMAttrModified</code> event</a>. Specifially, try checking the <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MutationEvent" rel="nofollow noreferrer"><code>event.attrName</code> property</a> to see if the <code>value</code> has been changed by autofill:</p> <pre><code>function realOnChange(event) { var attrName = event.propertyName || event.attrName; if(attrName === 'value') { // etc } } </code></pre> <p>The check for <a href="http://msdn.microsoft.com/en-us/library/ms536956(VS.85,loband).aspx" rel="nofollow noreferrer"><code>event.propertyName</code></a> is to stay compatible with your current <code>onpropertychange</code> implementation (if that is even possible).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload