@@ -143,7 +143,7 @@ <h2>Submit Tests</h2>
143143} ) ;
144144
145145// Events we want to track in row-order
146- var events = "bind-change live-change on -change bind-propertychange live-beforeactivate live-focusin bind-focus live-beforedeactivate live-focusout bind-blur live-click live-keydown" . split ( " " ) ,
146+ var events = "bind-change live-change onX -change bind-propertychange live-beforeactivate live-focusin bind-focus live-beforedeactivate live-focusout bind-blur live-click live-keydown" . split ( " " ) ,
147147 counter = 0 ;
148148 blinker = function ( event ) {
149149 if ( ! counter ) {
@@ -172,7 +172,7 @@ <h2>Submit Tests</h2>
172172 $ ( "#changes thead td" ) . each ( function ( ) {
173173 var id = "#" + this . id ,
174174 $cell = $ ( '<td></td>' ) ;
175- if ( api == "on " ) {
175+ if ( api == "onX " ) {
176176 $ ( this ) . find ( "input, button, select, textarea" ) . each ( function ( ) {
177177 this [ "on" + type ] = function ( e ) { e = $ . event . fix ( e || event ) ; e . data = $cell ; blinker . call ( this , e ) ; } ;
178178 } ) ;
@@ -186,6 +186,16 @@ <h2>Submit Tests</h2>
186186 $ ( "#changes tbody" ) . append ( $row ) ;
187187}
188188
189+ // Ensure that cloned elements get the delegated event magic; this is
190+ // implementation-specific knowledge but otherwise impossible to test.
191+ // The beforeactivate event attaches a direct-bound change event.
192+ // (Only care about the live change for this third select element.)
193+ var sel1 = $ ( "#select-one select:first-child" ) ;
194+ if ( typeof ( sel1 [ 0 ] . fireEvent ) !== "undefined" ) {
195+ sel1 . trigger ( "beforeactivate" ) . clone ( ) . appendTo ( "#select-one" ) ;
196+ //alert($("#select-one select").map(function(){ return this._change_attached || "undef"; }).get().join("|"));
197+ }
198+
189199jQuery . fn . blink = function ( ) {
190200 return this
191201 . css ( "backgroundColor" , "green" )
0 commit comments