Comments (10)
Hi @mgol
I did a PR to recover the old try..catch, it's ok???
Thanks.
Josep.
from jquery-ui.
Can you confirm whether this was working in the previous version (1.12.1)?
from jquery-ui.
Yes, the example works with 1.12.1 but not with 1.13.0
from jquery-ui.
Yes, the example works with 1.12.1 but not with 1.13.0
Thanks!
when you try to do a click in the button, a javascript error appear.
Can you post that error here?
from jquery-ui.
The error that appear in the javascript console is:
14:52:11.435 Uncaught TypeError: this._find(...) is null
jQuery 45
jquery-ui.js:18874:31
jQuery 45
from jquery-ui.
Thanks, this is the code location causing this error:
jquery-ui/ui/widgets/tooltip.js
Lines 351 to 357 in 70dae67
this._find( target )
returns null
, so the tooltip
function cannot be called on the return value.
However, that tooltip.js
hasn't been changed since 1.12.1.
@josepsanzcamp Could you verify whether the issue also affects jQuery UI 1.13.0 with other major versions of jQuery, e.g. 1.9.1 or 2.2.4?
from jquery-ui.
Hi @caugner.
I have tested that jquery 1.9.1, jquery 1.12.4 and jquery 2.2.4 works correctly with jquery-ui 1.12.1 but fails with jquery-ui 1.13.0.
Josep.
from jquery-ui.
Hi @caugner.
I have detected that the problem is in the widget.js.
I recovered the try catch found inside the loop of the $.cleanData and seems that works.
Original code in the 1.13.0:
$.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 );
And the merged code using the try catch found in the 1.12.1 and the latest 1.13.0:
$.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 );
Does it help you???
from jquery-ui.
@josepsanzcamp Thanks for the report. Nice find! The issue, as I see, is that the remove
handler can throw when this._find( target )
returns null
and it's no longer wrapped in try-catch
when called from cleanData
.
Would you like to submit a PR with a fix?
from jquery-ui.
jQuery UI 1.13.1 including a fix for this issue has been released: https://blog.jqueryui.com/2022/01/jquery-ui-1-13-1-released/.
from jquery-ui.
Related Issues (20)
- There are some inconsistencies with the current (and old) ThemeRoller HOT 1
- the select is not working in mobile HOT 2
- ui.tabs _isLocal fails if url contains username:password@ HOT 9
- Publishing older versions to NPM request HOT 1
- Cannot read properties of undefined (reading 'version') HOT 4
- User is not able to access the “Increment/decrement” hours and minutes button using “TAB” and “ARROWS” in the “Select time” dialogue. HOT 2
- Will there be build with jQuery 3.7.1? HOT 2
- Datepicker with custom yearRange; curent year in the middle of dropdown HOT 6
- conflict HOT 1
- The Slider range stops adjusting value when on developer tool device emulation mode HOT 1
- Fix the themeroller issue before releasing UI 1.13.3 HOT 1
- datepicker synchronization issue
- Accessibility: Autocomplete with remote datasource reads item value instead of item label to screen reader HOT 1
- When container is zoomed, Drag does not sync with mouse cursor HOT 4
- Chromebook touch issue HOT 1
- Update jQuery Color to 3.x
- SelectMenu Demo Error HOT 7
- Selectmenu click to browser browken HOT 1
- bug report HOT 1
- With the modal option set to true, elements in the background are still available in the AOM HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-ui.