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

Issue in jQuery-UI-1.13.1 - Fix done for ticket #8235 is removed #2116

Open
haseenaog opened this issue Sep 13, 2022 · 9 comments
Open

Issue in jQuery-UI-1.13.1 - Fix done for ticket #8235 is removed #2116

haseenaog opened this issue Sep 13, 2022 · 9 comments

Comments

@haseenaog
Copy link

Description

Missing fix for ticket #8235 in latest versions of jQuery-UI is creating issue when overlays are used in screen.

I used jQuery-UI-1.13.1 and jQuery-UI-1.13.2 in my project. When I open any overlay and select data and return to parent page, parent page gets rendered twice. This issue is getting resolved if I put back fix done for ticket #8235. So kindly let me know why was this fix removed. Let me know if it is handled differently and if I need to check that.

Link to test case

@mgol mgol transferred this issue from jquery/jquery Sep 13, 2022
@mgol
Copy link
Member

mgol commented Sep 13, 2022

Thanks for the report. I transferred the issue to the correct repo as this is jQuery UI related.

Please paste a link to the correct issue as I don’t know which issue you are referring to.

@haseenaog
Copy link
Author

haseenaog commented Sep 13, 2022 via email

@mgol
Copy link
Member

mgol commented Sep 13, 2022

This is a jQuery issue, not jQuery UI. Also, it's been fixed long ago and the whole jQuery Data implementation has been rewritten from scratch since that time. I doubt this is related to anything.

If you have an issue to report, please submit a test case where the issue can be clearly visible. You can use a service like JS Bin for that.

Also, does the issue exist in jQuery 1.13.x or just 1.12.1?

@haseenaog
Copy link
Author

Issue is in jQuery 1.13.1 and 1.13.2 versions.

Code in jQuery-UI-1.12.1:
$.cleanData = ( function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
try {

			// Only trigger remove when necessary to save time
			events = $._data( elem, "events" );
			if ( events && events.remove ) {
				$( elem ).triggerHandler( "remove" );
			}

		// Http://bugs.jquery.com/ticket/8235
		} catch ( e ) {}
	}
	orig( elems );
};

} )( $.cleanData );

Code in jQuery-UI-1.13.1 and jQuery-UI-1.13.2:
$.cleanData = ( function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {

		// Only trigger remove when necessary to save time
		events = $._data( elem, "events" );
		if ( events && events.remove ) {
			$( elem ).triggerHandler( "remove" );
		}
	}
	orig( elems );
};

} )( $.cleanData );

Missing try and catch blocks are causing issue when open and close overlays.

@mgol
Copy link
Member

mgol commented Sep 13, 2022

Thanks, but we still need a live test case as I mentioned.

@pwkoscp123

This comment was marked as off-topic.

@pwkoscp123

This comment was marked as off-topic.

@mgol

This comment was marked as off-topic.

@pwkoscp123

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants