Cancel delayed/timed events

I have a ‘onTimedKeyPress’ event attached to a textarea. Under certain circumstances, I want to be able to cancel the event before it is fired, but not remove the event.

I’m calling a save() in the onTimedKeyPress event, which saves the content of the textarea 2.5 seconds (keyPressTimeout: 2500) after the user stops typing. I also have a button that calls the same save() function, but if the user presses the button less than 2.5 seconds after he stops typing, save() is called twice.

Is there anyway to do this natively or do I have to find some sort of workaround?

Probably the following workaround may help you:

http://webix.com/snippet/e30d6e57

Many thanks.