This project is read-only.

Get node text value while in edit mode

Sep 27, 2012 at 4:24 PM


I my scenario , I have button near every node. When I edit node and direcltly click on button, updated value for that node not getting click event untill and unless focussed lossed for node.

This behaviour found in only in firefox. In IE it works fine because it not triggring button click event if node in edit mode.

Please suggest me to solve this issue.




Sep 27, 2012 at 9:13 PM

Do you mean the lost focus handler is executed after the on click of the button, so that the click handle doesnt find the node already updated? Some browser do trigger events handler in the wrong order. You can resolve by putting the code executed in the click handler in a setTimeout:

setTimeout(function(){ --your code here-----});

This way the code is executed in a separate thread, after all event handlers have been executed. You can use this trick to control the order of execution of handlers also in other similar situations.