onBlur Event

Hi Team,

I have a text field in my form, and on it’s ‘onBlur’ event I am calling a function to validate the value of the text field. If the value is beyond my expectation I show an alert message.

In that form only I am having my gojs my pallete window.

‘onBlur’ event simply means that the focus goes off from a particular element of the web page.

Now what the problem I am facing is that - when I entering value in the textfield and pressing tab button or clicking anywhere in the form apart from Gojs section, the validation functionality goes fine.

But, after entering the value in textfield, if I am clicking the gojs pallete than if the text are valid than gojs pallete window works fine, but if the text value is invalid the alert message popups and when I press the ok button, than some sort of rectangular/square share arc is being started on movement of mouse.

You can see the pink color rectangle…

Please help.

A Selection box started on the pallette because you “held” the mouse in place for long enough.

It thinks you held it in place because of the alert box, most likely.

There are a few ways you could fix this, and it might take some experimentation to get right.

One would be to call


Right before the alert box is shown (or right before anything that might take focus from the Palette)

Give that a try. If that doesn’t work, we might need to take a look at the code to make a recommendation. You can always email us: gojs (at) nwoods.com

Hi Simon,

myPalette.currentTool.stopTool(); works for me.

Thanks a lot for your help.