Skip to main content

Search and Top Navigation

#5119 closed bug (fixed)

Opened February 01, 2010 05:54PM UTC

Closed February 06, 2010 03:53AM UTC

Last modified January 18, 2012 01:44AM UTC

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

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

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 );
};
Attachments (0)
Change History (4)

Changed February 03, 2010 07:48PM UTC by jzaefferer comment:1

description: Cause not entirely clear, yet, details here: http://forum.jquery.com/topic/1-4-1-does-not-seem-to-like-ui-1-8rc1Cause 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 ); \ }; \ }}}

Changed February 06, 2010 03:53AM UTC by scottgonzalez comment:2

component: ui.coreui.widget
resolution: → fixed
status: newclosed

Fixed in r3783.

Changed March 29, 2010 02:21PM UTC by rdworth comment:3

Backported to 1.7.3 in r3977

Changed January 18, 2012 01:44AM UTC by scottgonzalez comment:4

milestone: 1.81.7.3