]> source.dussan.org Git - jquery.git/commitdiff
When binding a change directly to a file input just passthrough to the normal bind...
authorjeresig <jeresig@gmail.com>
Sat, 13 Feb 2010 09:40:26 +0000 (04:40 -0500)
committerjeresig <jeresig@gmail.com>
Sat, 13 Feb 2010 09:40:26 +0000 (04:40 -0500)
src/event.js
test/delegatetest.html

index 17d7673ee02ce6fb17cabaff5be59d179fe1a0a8..c6a953b2fb5636814ed6b2fce0941ef881578b79 100644 (file)
@@ -769,6 +769,10 @@ if ( !jQuery.support.changeBubbles ) {
                },
 
                setup: function( data, namespaces ) {
+                       if ( this.type === "file" ) {
+                               return false;
+                       }
+
                        for ( var type in changeFilters ) {
                                jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
                        }
index 1a785a306624c4d66b1ea737066e240be99be9f3..b2840c1292858942220674a89b39e314cc007e16 100644 (file)
@@ -52,6 +52,8 @@
                <input type="radio" class="radio_test" name="myradio" id="radio3" disabled="disabled"/>\r
                <label for="radio3">Radio3</label>\r
                </td>\r
+               <td>\r
+               <input class="file_test" id="file1" type="file"/>\r
                <td>\r
                <input class='test' value='' id='input' size='10' />\r
                <input class='test' value='test' id='input2' size='10' readonly="readonly" />\r
@@ -67,6 +69,7 @@
                <td id='mselect' class="red">MULTI</td>\r
                <td id='checkbox' class="red">CHECKBOX</td>\r
                <td id='radio' class="red">RADIO</td>\r
+               <td id='file' class="red">FILE</td>\r
                <td id='text' class="red">TEXT</td>\r
                <td id='textarea' class="red">TEXTAREA</td>\r
                <td id='boundChange' class="red">DOCUMENT</td>\r
@@ -77,6 +80,7 @@
                <td id='mselectbind' class="red">MULTI</td>\r
                <td id='checkboxbind' class="red">CHECKBOX</td>\r
                <td id='radiobind' class="red">RADIO</td>\r
+               <td id='filebind' class="red">FILE</td>\r
                <td id='textbind' class="red">TEXT</td>\r
                <td id='textareabind' class="red">TEXTAREA</td>\r
            </tr>\r
@@ -86,6 +90,7 @@
                <td id='mselectfocus' class="red">MULTI</td>\r
                <td id='checkboxfocus' class="red">CHECKBOX</td>\r
                <td id='radiofocus' class="red">RADIO</td>\r
+               <td id='filefocus' class="red">FILE</td>\r
                <td id='textfocus' class="red">TEXT</td>\r
                <td id='textareafocus' class="red">TEXTAREA</td>\r
                <td id='boundFocus' class="red">DOCUMENT</td>\r
                <td id='mselectblur' class="red">MULTI</td>\r
                <td id='checkboxblur' class="red">CHECKBOX</td>\r
                <td id='radioblur' class="red">RADIO</td>\r
+               <td id='fileblur' class="red">FILE</td>\r
                <td id='textblur' class="red">TEXT</td>\r
                <td id='textareablur' class="red">TEXTAREA</td>\r
                <td id='boundBlur' class="red">DOCUMENT</td>\r
                <td id='mselectlfocus' class="red">MULTI</td>\r
                <td id='checkboxlfocus' class="red">CHECKBOX</td>\r
                <td id='radiolfocus' class="red">RADIO</td>\r
+               <td id='filelfocus' class="red">FILE</td>\r
                <td id='textlfocus' class="red">TEXT</td>\r
                <td id='textarealfocus' class="red">TEXTAREA</td>\r
            </tr>\r
                <td id='mselectlblur' class="red">MULTI</td>\r
                <td id='checkboxlblur' class="red">CHECKBOX</td>\r
                <td id='radiolblur' class="red">RADIO</td>\r
+               <td id='filelblur' class="red">FILE</td>\r
                <td id='textlblur' class="red">TEXT</td>\r
                <td id='textarealblur' class="red">TEXTAREA</td>\r
            </tr>\r
        $(".mselect_test").addChangeTest("#mselect");\r
        $(".checkbox_test").addChangeTest("#checkbox");\r
        $(".radio_test").addChangeTest("#radio");\r
+       $(".file_test").addChangeTest("#file");\r
        $('textarea').addChangeTest("#textarea");\r
        $('#input').addChangeTest("#text");\r
        $(document).bind("change", function(){\r