Changeset 129521 in webkit


Ignore:
Timestamp:
Sep 25, 2012, 10:08:01 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2012-09-25
Reviewed by Darin Adler.

Modified the code do only add event listeners to the given inputs,
and not to the full document.

  • committers-autocomplete.js:
Location:
trunk/Websites/bugs.webkit.org
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Websites/bugs.webkit.org/ChangeLog

    r129369 r129521  
     12012-09-25  Peter Gal  <galpeter@inf.u-szeged.hu>
     2
     3        committers-autocomplete.js works only with WebKit based browsers
     4        https://bugs.webkit.org/show_bug.cgi?id=66752
     5
     6        Reviewed by Darin Adler.
     7
     8        Modified the code do only add event listeners to the given inputs,
     9        and not to the full document.
     10
     11        * committers-autocomplete.js:
     12
    1132012-09-24  Peter Beverloo  <peter@chromium.org>
    214
  • trunk/Websites/bugs.webkit.org/committers-autocomplete.js

    r122276 r129521  
    392392    }
    393393
    394     document.addEventListener('focusin', function(e) {
    395         for (var i = 0; i < EMAIL_INPUTS.length; i++) {
    396             if (e.target.name == EMAIL_INPUTS[i]) {
    397                 enableAutoComplete(e.target);
    398                 break;
    399             }
    400         }
    401     }, false);
     394    for (var i = 0; i < EMAIL_INPUTS.length; i++) {
     395        var field = document.getElementById(EMAIL_INPUTS[i]);
     396        if (field)
     397            field.addEventListener("focus", function(e) { enableAutoComplete(e.target); }, false);
     398    }
    402399
    403400    WebKitCommitters.getCommitters(function (committers) {
Note: See TracChangeset for help on using the changeset viewer.