sridhars711 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Doesn't work with prototype library in jQuery.noConflict() mode. #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. include lib: 
<script language="javascript" type="text/javascript"
src="prototype.js"></script>
<script language="javascript" type="text/javascript"
src="jquery-1.2.6.js"></script>
<script>
var $j = jQuery.noConflict();
</script>
<link type="text/css" rel="stylesheet" href="skin/ui.dynatree.css" />
<script language="javascript" type="text/javascript"
src="jquery.dynatree.js"></script>
....

2. Click a tree node will cause runtime error as below:

$(this.tree.tnFocused.span).addClass is not a function
onFocus()(Object originalEvent=Event focus type=focus)jquery.d...natree.js
(line 535)
fnFocusHandler(Object originalEvent=Event focus
type=focus)jquery.d...natree.js (line 875)
[Break on this error]
$(this.tree.tnFocused.span).addClass(this.tree.options.classnames.focused);

==========================================================================

$(event.target).hasClass is not a function
onClick()(Object originalEvent=Event click which=1
view=window)jquery.d...natree.js (line 421)
fnClick(Object originalEvent=Event click which=1
view=window)jquery.d...natree.js (line 846)
handle()(Object originalEvent=Event click which=1
view=window)jquery-1.2.6.js (line 2076)
(?)()()jquery-1.2.6.js (line 1858)
[Break on this error] if(
$(event.target).hasClass(this.tree.options.classnames.expander) ) {

==========================================================================

$(this.tree.tnFocused.span).removeClass is not a function
onFocus()(Object originalEvent=Event blur type=blur)jquery.d...natree.js
(line 524)
fnFocusHandler(Object originalEvent=Event blur
type=blur)jquery.d...natree.js (line 875)
[Break on this error]
$(this.tree.tnFocused.span).removeCl...s(this.tree.options.classnames.focused);

What is the expected output? What do you see instead?

What version of the product are you using?
On what operating system and browser?

IE 7.0 or FF 3.0

Please provide any additional information below.

Original issue reported on code.google.com by wayne.tr...@gmail.com on 12 Dec 2008 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 12 Dec 2008 at 7:08

GoogleCodeExporter commented 9 years ago
I'm using this version of dynatree.

$Version: 0.3.0$
$Revision: 97, 2008-12-07 18:30:35$

I tried to find the easiest way to fix this problem might be:
Range from line 1 to line 826, replace $ with jQuery,
which means any $ outside of the (function($) { ... })(jQuery) should be in 
form as
jQuery.

Hope this will be helpful.

Original comment by wayne.tr...@gmail.com on 15 Dec 2008 at 3:13

GoogleCodeExporter commented 9 years ago
Should be fixed with 0.4 alpha.
Still needs to be verified (feedback would be nice :-)

Original comment by moo...@wwwendt.de on 14 Jan 2009 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 14 Jan 2009 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 17 Jan 2009 at 9:12