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

TESTS - RangeInput 1.2.8 and compatibility with jQuery 1.91 #953

Open
alibby251 opened this issue Feb 23, 2013 · 2 comments
Open

TESTS - RangeInput 1.2.8 and compatibility with jQuery 1.91 #953

alibby251 opened this issue Feb 23, 2013 · 2 comments

Comments

@alibby251
Copy link
Contributor

The dev version of RangeInput, which will become 1.2.8, works with jQuery 1.9.1 as long as the jQuery migrate plugin is used; use of the migrate plugin has revealed this warning:

Use of jQuery.fn.data('events') is deprecated

A check at https://github.com/jquery/jquery-migrate/blob/master/warnings.md shows this:

"JQMIGRATE: Use of jQuery.fn.data('events') is deprecated

Cause: Prior to 1.9, .data("events") could be used to retrieve jQuery's undocumented internal event data structure for an element if no other code had defined a data element with the name "events". This special case has been removed in 1.9.

Solution: There is no public interface to retrieve this internal data structure, and it remains undocumented. The only useful applications might be for debugging. The data is available via jQuery._data("events") but this is not a documented interface."

From what I can see in the code, it seems to be at lines 134-137 in RangeInput, that causes this issue:

    function hasEvent(el) {
        var e = el.data("events");
        return e && e.onSlide;
    }

Any solutions/suggestions welcome...

FYI - I think this was the bug report relating to the above deprecation: http://bugs.jquery.com/ticket/10589...

@alibby251
Copy link
Contributor Author

An update:

For the moment, I've created updated demos, that contain patched versions of RangeInput which include the functionality removed as part of jQuery 1.9.1 - they are:

Minimal setup for rangeinput - http://jsfiddle.net/alibby251/WH57r/
A couple of vertical ranges - http://jsfiddle.net/alibby251/BwwyZ/
Multiple small ranges - http://jsfiddle.net/alibby251/YEckz/
A custom scrollbar for a DIV - http://jsfiddle.net/alibby251/uycgv/

Although the above all appear to work OK, and don't flag up the warnings, it would be good to update the code to include a more permanent/better fix for the jQuery.fn.data('events') is deprecated warning.

Please feel free to try them out - any comments/issues with compatibility with jQuery 1.9.1, please post here.

@alibby251
Copy link
Contributor Author

I've completed initial tests on the above in IE, Firefox, Opera and Safari - so far, all have them have tested OK with the changes required to ensure compatibility with jQuery 1.9.1. As I haven't seen any reports of issues with the changes made in the above demos, then I will be looking to commit those changes to source, and push the dev version of jQuery Tools into what will be Tools 1.2.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant