WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Xtree: Multiple blur and focus occurs, Micha Schopman, April 17, 2003
     Re:Xtree: Multiple blur and focus occurs, Micha Schopman, April 18, 2003

Subject: Re:Xtree: Multiple blur and focus occurs From: Micha Schopman Date: April 18, 2003

Another case:

1) Select a node in the tree, it gets selected.
2) Select a link in another frame/iframe, the node gets blurred
3) Select another node in the tree, it gets selected and the blurred node stays blurred.

From: Micha Schopman
Sent: April 17, 2003
Subject: Re:Xtree: Multiple blur and focus occurs

I notice this bug, which I guess is caused by executed xtree methods who execute to fast after each other. For example this happens when I do something like this.

I select a node to cut and store it in a variable:
oCuttedNode = tree.getSelected();
oCuttedNodeParent = tree.getSelected().parentNode;

Now I paste the node into another node:
I select the node to paste into and store this into a variable:

oPastingNode = tree.getSelected();

I remove the cutted node:
oCuttedNode.remove();

Now the parent of the cuttedNode gets focus, I want the focus to be on the node to paste into and not on the CuttedNodeParent.
oCuttedNodeParent.deSelect();
oPastingNode.focus();

Executing the serverside code to do a copy paste
Reload the oPastingNode which just got an extra child:
oPastingNode.reload();

However this all happens so fast, the tree gets confused with blur and focus, which results in multiple nodes being selected, focussed and blurred.

How can I prevent this from happening?





Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX