Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE 8 clears the expando instead of setting it to undefined #2596

Closed
mgol opened this issue Sep 14, 2015 · 1 comment
Closed

IE 8 clears the expando instead of setting it to undefined #2596

mgol opened this issue Sep 14, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@mgol
Copy link
Member

@mgol mgol commented Sep 14, 2015

The following test fails on IE 8 and only there:

jquery/test/unit/event.js

Lines 2728 to 2750 in fc87a5c

QUnit.test( ".off() removes the expando when there's no more data", function( assert ) {
assert.expect( 2 );
var key,
div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" );
div.on( "click", false );
div.on( "custom", function() {
assert.ok( true, "Custom event triggered" );
} );
div.trigger( "custom" );
div.off( "click custom" );
// Make sure the expando is gone
for ( key in div[ 0 ] ) {
if ( /^jQuery/.test( key ) ) {
assert.strictEqual(
div[ 0 ][ key ], undefined,
"Expando was not removed when there was no more data"
);
}
}
} );

@mgol mgol added the Event label Sep 14, 2015
@mgol mgol added this to the 3.0.0 milestone Sep 14, 2015
@mgol mgol self-assigned this Sep 14, 2015
mgol added a commit that referenced this issue Sep 14, 2015
IE 8 gets the expando removed via removeAttribute so the second assertion
won't be reached. The expected assertion count had to be updated.

Fixes gh-2596
@mgol
Copy link
Member Author

@mgol mgol commented Sep 14, 2015

Fixed in 4b1cff6

@mgol mgol closed this Sep 14, 2015
@dmethvin dmethvin added this to the 1.12/2.2 milestone Jan 8, 2016
@dmethvin dmethvin removed this from the 3.0.0 milestone Jan 8, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants