Bug Tracker

Ticket #2114: formelements.patch

File formelements.patch, 946 bytes (added by scottgonzalez, 8 years ago)
  • core.js

     
    3838                selector = selector || document;
    3939
    4040                // Handle $(DOMElement)
    41                 if ( selector.nodeType ) {
     41                // in IE form.elements looks like form
     42                if ( selector.nodeType  && ( selector.nodeName.toUpperCase() != "FORM" ) ) {
    4243                        this[0] = selector;
    4344                        this.length = 1;
    4445                        return this;
     
    9394
    9495                        // HANDLE: $(arraylike)
    9596                        // Watch for when an array-like object, contains DOM nodes, is passed in as the selector
    96                         (selector.jquery || selector.length && selector != window && !selector.nodeType && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
     97                        (selector.jquery || selector.length && selector != window && selector[0] != undefined && selector[0].nodeType) && jQuery.makeArray( selector ) ||
    9798
    9899                        // HANDLE: $(*)
    99100                        [ selector ] );