My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 42: when the dyntree is "undisplayed" (ie. the DIV removed from DOM or sth. similiar), focus throws an error $(this.span).find is not a function
1 person starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  moo...@wwwendt.de
Closed:  Oct 2008


 
Reported by haraldar...@gmail.com, Oct 16, 2008
What steps will reproduce the problem?
1. Create a dyntree
2. do something
3. remove the DIV with the dyntree in it
4. profit :) ... an error is thrown in the JS console


This is fixable by replacing lines 261ff with:

	focus: function() {
//		logMsg("dtnode.focus(): %o", this);
		this.makeVisible();
        try{
		jQuery(this.span).find(">a").focus();}
        catch(x){};
	},

BTW: I took the freadom to also rewrite "$" to jQuery, as in
jQuery.noconflict() $ may or may not be a shortcut to jQuery

Would be happy if this fix gets applied,

Harald
Oct 16, 2008
Project Member #1 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Owner: moo...@wwWendt.de
Labels: Milestone-Release0.3
Oct 19, 2008
Project Member #2 moo...@wwwendt.de
Applied with r61
Wasn't able to reproduce the described exception using $('#tree').remove(), still the
try - catch won't hurt.
Renaming $ to jQuery is now  issue #43 
Status: Fixed
Oct 19, 2008
#3 haraldar...@gmail.com
behaviour was exposed when using dyntree within a tiny_mce editor window, that was
cleared up. (that is, not only $('#tree').remove(), but <iframe><html><body><div
id='content'><div id='tree'>.... 

and all starting with the iframe removed.

rather exotic, but not unusual :) guess problem starts with the jQuery object being
connected to the iframe-window-object and race condition occuring.

Harald
Jul 17, 2012
Project Member #4 moo...@wwwendt.de
considered verified
Status: Verified

Powered by Google Project Hosting