Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With the ongoing refactoring of our JavaScripts as a result of jQuery 1.7 landing in Drupal 8, we are finding more resulting issues.
Here's another one: We shouldn't use isNaN() on jQuery objects anymore. The only script of ours that this effects is overlay's overlay-parent.js. We should modify the code to use isNumeric() instead.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1342336-is-numeric.patch | 986 bytes | aspilicious |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedA patch
Comment #2
cosmicdreams CreditAttribution: cosmicdreams commentedWhile this works is it proper syntax to encapsulate the isNumeric in parentheses? Appending a "!" to the front of the isNumeric should be sufficient.
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commentedSorry aspilicious. It appears I sent you on a wild goose chase here.
The isNaN that is used by overlay-parent is the JavaScript core language's function not jQuery's. So this will continue to work with jQuery 1.7.
Also, the patch you provided actually causes errors since the javascript language doesn't have a isNumeric function.
We should mark this as won't fix or close it or something.
Comment #3.0
cosmicdreams CreditAttribution: cosmicdreams commentedEdited description for accuracy. Linked reference of jQuery changes.