Reviewed by Tony Chang.
autocomplete=off prevents refilling form fields on back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=47463
I haven't actually run this patch due to the difficulty of getting
a bugzilla instance running. It's simple enough code that I'm not too worried
about it.
* committers-autocomplete.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79515
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-02-23 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ autocomplete=off prevents refilling form fields on back/forward navigation
+ https://bugs.webkit.org/show_bug.cgi?id=47463
+
+ I haven't actually run this patch due to the difficulty of getting
+ a bugzilla instance running. It's simple enough code that I'm not too worried
+ about it.
+
+ * committers-autocomplete.js:
+
2011-02-21 Ojan Vafai <ojan@chromium.org>
Reviewed by Adam Barth.
if (!getMenu()) {
createMenu(m_focusedInput.name);
+ // Turn off autocomplete to avoid showing the browser's dropdown menu.
m_focusedInput.setAttribute('autocomplete', 'off');
m_focusedInput.addEventListener('keyup', handleKeyUp, false);
m_focusedInput.addEventListener('keydown', handleKeyDown, false);
m_prefix = null;
m_selectedIndex = 0;
}, false);
+ // Turn on autocomplete on submit to avoid breaking autofill on back/forward navigation.
+ m_focusedInput.form.addEventListener("submit", function() {
+ m_focusedInput.setAttribute("autocomplete", "on");
+ }, false);
}
updateMenu();