Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#5119 closed bug (fixed)

Overriden $.fn.remove issue in IE8 on window resize

Reported by: Jörn Zaefferer Owned by:
Priority: blocker Milestone: 1.7.3
Component: ui.widget Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Jörn Zaefferer)

Cause not entirely clear, yet, details here: http://forum.jquery.com/topic/1-4-1-does-not-seem-to-like-ui-1-8rc1

jQuery core remove implementation:

// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
	if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
		if ( !keepData && this.nodeType === 1 ) {
			cleanData( this.getElementsByTagName("*") );
			cleanData( [ this ] );
		}

		if ( this.parentNode ) {
			 this.parentNode.removeChild( this );
		}
	}
}

Override in widget:

var _remove = $.fn.remove;

$.fn.remove = function( selector, keepData ) {
	if ( !keepData ) {
		$( "*", this ).add( this ).each(function() {
			$( this ).triggerHandler( "remove" );
		});
	}
	return _remove.apply( this, arguments );
};

Change History (4)

comment:1 Changed 8 years ago by Jörn Zaefferer

Description: modified (diff)

comment:2 Changed 8 years ago by Scott González

Component: ui.coreui.widget
Resolution: fixed
Status: newclosed

Fixed in r3783.

comment:3 Changed 8 years ago by rdworth

Backported to 1.7.3 in r3977

comment:4 Changed 6 years ago by Scott González

Milestone: 1.81.7.3
Note: See TracTickets for help on using tickets.