Ticket #5119 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

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

Reported by: joern.zaefferer Owned by:
Priority: blocker Milestone: 1.7.3
Component: ui.widget Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description (last modified by joern.zaefferer) (diff)

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

comment:1 Changed 5 years ago by joern.zaefferer

  • Description modified (diff)

comment:2 Changed 5 years ago by scott.gonzalez

  • Status changed from new to closed
  • Resolution set to fixed
  • Component changed from ui.core to ui.widget

Fixed in r3783.

comment:3 Changed 5 years ago by rdworth

Backported to 1.7.3 in r3977

comment:4 Changed 3 years ago by scott.gonzalez

  • Milestone changed from 1.8 to 1.7.3
Note: See TracTickets for help on using tickets.