| Issue 203: | Context Menu example has issue with jQuery 1.6.1 | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. replace 'jquery.min.js' with latest version (1.6.1) 2. run: http://wwwendt.de/tech/dynatree/doc/sample-contextmenu.html 3. open Context menu on any node, it shows undefined (node) Dynatree is great! Thanks.
May 30, 2011
#2
mrdu...@gmail.com
May 31, 2011
I investigated more & found out this line doesn't work with jQuery 1.6
var node = el.parents("[dtnode]").attr("dtnode");
It seems can't get dtnode attribute from <li> tag (parent of <span> tag). But it works fine with jQuery 1.5. Any idea?
May 31, 2011
May be related to this: http://api.jquery.com/prop/ Does el.parents("[dtnode]") not return a match, or will .attr("dtnode") not work? In the latter case, could you try .prop() instead?
Status:
Accepted
Labels: -Priority-Medium Priority-High Milestone-Release1.1.2
May 31, 2011
It was the later case. .prop() works! you are genius :) API quoted - "Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() only retrieves attributes." Can you add .prop() to support jQuery 1.6, I don't know if we can check jQuery version or not.
Jun 5, 2011
Fixed with r496
Jun 5, 2011
Release 1.1.2 is rather a feature release 1.2.0
Labels:
Milestone-Release1.2
Jul 17, 2012
considered verified
Jul 17, 2012
(No comment was entered for this change.)
Status:
Verified
|