Hello Rumen (and others),
I'd like to raise the visibility of this as it was buried in another post. After having used the "BeforeBeginEdit" event to capture a double-click event on a node, the node text disappears until you click on another node. This is highly undesireable in a "read only" tree, where the text will never be edited anyhow. I have unsuccessfully tried to capture and restore text, but can't seem to find out how to do so.
Is there way to prevent this behavior during double-click processing? Or a work-around to this apparent bug? My production date is approaching and I'm a little panicked by this strange behavior.
Thanks,Dan
Hello Dan,
I am afraid that this was just a workaround that one of the customers (in the other forum thread) suggested. Unfortunately I am too stuck with this problem, and while I will try to find a solution asap (and post a followup), I am afraid that the general problem is that there is just not a client-side double click event and the workarounds suggested have side effects.
I will try to solve this problem and write back to you, hopefully the customer who got that working will also post his custom code for that.
Please, excuse me for the inconvenince.
Thanks Rumen, I appreciate the help.
Right now I am going down the approach of capturing the text (getText() ) in the BeforeBeginNodeEdit and attempting to put it back using the setText() option, but am running into a problem with the setText code for the node:
function igtree_setText(text, innerHTML) { var e = ig_getNodeTextElement(this); this.update("Text", text); if(e.innerText != null) try{return e.innerText = text;}catch(ex){} else try{return e.innerHTML = text;}catch(ex){}}
In this code, the variable e is always null, meaning the ig_getNodeTextElement(this) call fails.
I'll keep plugging away, but my deadline is fast approaching and need to have some resolution for the disappearing text, even if it is to just catch it and put it back. Hopefully others can offer any solutions they may have found.
Thanks again,Dan