Title: [133576] trunk/Websites/bugs.webkit.org
Revision
133576
Author
[email protected]
Date
2012-11-06 02:26:08 -0800 (Tue, 06 Nov 2012)

Log Message

committers-autocomplete.js works only with WebKit based browsers
https://bugs.webkit.org/show_bug.cgi?id=66752

Patch by Ryosuke Niwa <[email protected]> on 2012-11-06
Reviewed by Csaba Osztrogonác.

Based on the patch posted by Peter Gal. Attach event listeners
to all input elements we want to enable auto-completions on.

* committers-autocomplete.js:

Modified Paths

Diff

Modified: trunk/Websites/bugs.webkit.org/ChangeLog (133575 => 133576)


--- trunk/Websites/bugs.webkit.org/ChangeLog	2012-11-06 10:15:06 UTC (rev 133575)
+++ trunk/Websites/bugs.webkit.org/ChangeLog	2012-11-06 10:26:08 UTC (rev 133576)
@@ -1,3 +1,15 @@
+2012-11-06  Ryosuke Niwa  <[email protected]>
+
+        committers-autocomplete.js works only with WebKit based browsers
+        https://bugs.webkit.org/show_bug.cgi?id=66752
+
+        Reviewed by Csaba Osztrogonác.
+
+        Based on the patch posted by Peter Gal. Attach event listeners
+        to all input elements we want to enable auto-completions on.
+
+        * committers-autocomplete.js:
+
 2012-10-03  Simon Fraser  <[email protected]>
 
         Make the status bubble iframe big enough to show all the bubbles

Modified: trunk/Websites/bugs.webkit.org/committers-autocomplete.js (133575 => 133576)


--- trunk/Websites/bugs.webkit.org/committers-autocomplete.js	2012-11-06 10:15:06 UTC (rev 133575)
+++ trunk/Websites/bugs.webkit.org/committers-autocomplete.js	2012-11-06 10:26:08 UTC (rev 133576)
@@ -391,14 +391,11 @@
         updateMenu();
     }
 
-    document.addEventListener('focusin', function(e) {
-        for (var i = 0; i < EMAIL_INPUTS.length; i++) {
-            if (e.target.name == EMAIL_INPUTS[i]) {
-                enableAutoComplete(e.target);
-                break;
-            }
-        }
-    }, false);
+    for (var i = 0; i < EMAIL_INPUTS.length; i++) {
+        var field = document.getElementsByName(EMAIL_INPUTS[i])[0];
+        if (field)
+            field.addEventListener("focus", function(e) { enableAutoComplete(e.target); }, false);
+    }
 
     WebKitCommitters.getCommitters(function (committers) {
         m_committers = committers;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to