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 with --data-ajax--url and jquery 1.11.2 #2969

Closed
loic opened this Issue Jan 26, 2015 · 6 comments

Comments

Projects
None yet
4 participants
@loic
Contributor

loic commented Jan 26, 2015

--data-ajax--url is ignored while the deprecated --data-ajax-url work.

http://jsbin.com/wotamodeco/1 demonstrates the issue.

@kevin-brown kevin-brown added this to the 4.0 milestone Jan 28, 2015

@kevin-brown

This comment has been minimized.

Show comment
Hide comment
@kevin-brown

kevin-brown Feb 7, 2015

Member

Just following up on this some more based on conversations on IRC.

This appears to be a difference in how jQuery 1.x and 2.x parse the data attributes. I've created two jsbins that clearly reproduce the differences.

1.x: http://jsbin.com/zudohezome/1/edit?html,js,output
2.x: http://jsbin.com/zudohezome/2/edit?html,js,output

This is definitely a jQuery bug, as the HTML5 dataset attribute requires that the second dash is left. Here is a jsbin that confirms it: http://jsbin.com/ruratofulu/1/edit?html,js,output

Member

kevin-brown commented Feb 7, 2015

Just following up on this some more based on conversations on IRC.

This appears to be a difference in how jQuery 1.x and 2.x parse the data attributes. I've created two jsbins that clearly reproduce the differences.

1.x: http://jsbin.com/zudohezome/1/edit?html,js,output
2.x: http://jsbin.com/zudohezome/2/edit?html,js,output

This is definitely a jQuery bug, as the HTML5 dataset attribute requires that the second dash is left. Here is a jsbin that confirms it: http://jsbin.com/ruratofulu/1/edit?html,js,output

kevin-brown added a commit that referenced this issue Feb 10, 2015

Add jQuery 1.x data attribute note
This adds a note about how nested data attributes do not work in
jQuery 1.x due to a bug with the `$.fn.data` method.

This is for #2969.
@kevin-brown

This comment has been minimized.

Show comment
Hide comment
@kevin-brown

kevin-brown Feb 18, 2015

Member

I added a note to the documentation about this in caeb0ec, but unfortunately it does not look like the fix will be released for jQuery any time soon. As there is not much that we can do, aside from preferring dataset when possible, I'm going to close this off once I implement the dataset check.

That will still mean that it still won't work in older browsers (IE 10 and below), but there isn't much that we can do about it.

Member

kevin-brown commented Feb 18, 2015

I added a note to the documentation about this in caeb0ec, but unfortunately it does not look like the fix will be released for jQuery any time soon. As there is not much that we can do, aside from preferring dataset when possible, I'm going to close this off once I implement the dataset check.

That will still mean that it still won't work in older browsers (IE 10 and below), but there isn't much that we can do about it.

@304NotModified

This comment has been minimized.

Show comment
Hide comment
@304NotModified

304NotModified May 23, 2015

I think there should be a workaround for this (with attributes). Or is it there already?

304NotModified commented May 23, 2015

I think there should be a workaround for this (with attributes). Or is it there already?

@onokazu

This comment has been minimized.

Show comment
Hide comment
@onokazu

onokazu Aug 2, 2015

The documentation still says that this is not supported with jQuery 1.x, or has this been resolved with the recent changes in jquery?

onokazu commented Aug 2, 2015

The documentation still says that this is not supported with jQuery 1.x, or has this been resolved with the recent changes in jquery?

@kevin-brown

This comment has been minimized.

Show comment
Hide comment
@kevin-brown

kevin-brown Aug 2, 2015

Member

This is still an issue with jQuery 1.x and was not fixed in the recent 1.11.3 release.

http://jsbin.com/midenufoqa/1/edit?html,js,output

It is still fixed in the jQuery 2.x line and upcoming 3.x line.

Member

kevin-brown commented Aug 2, 2015

This is still an issue with jQuery 1.x and was not fixed in the recent 1.11.3 release.

http://jsbin.com/midenufoqa/1/edit?html,js,output

It is still fixed in the jQuery 2.x line and upcoming 3.x line.

@304NotModified

This comment has been minimized.

Show comment
Hide comment
@304NotModified

304NotModified Aug 2, 2015

Can't we have an alternative syntax to get it working with jquery 1.x?

304NotModified commented Aug 2, 2015

Can't we have an alternative syntax to get it working with jquery 1.x?

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