Search and Top Navigation
#5172 closed feature (wontfix)
Opened February 11, 2010 07:11PM UTC
Closed March 20, 2010 07:59PM UTC
Last modified October 11, 2012 09:15PM UTC
Allow cancelling of all autocomplete events
Reported by: | Rwhitbeck | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.autocomplete | Version: | 1.8rc1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I would like to be able to cancel the close event, for weird client-requirement reasons.
It seems reasonable to make all the events cancelable. In this case of close, the code change is simple:
From:
this._trigger( "close", event );
this.menu.element.remove();
this.menu = null;
To:
if ( false !== self._trigger( "close", event ) ) {
this.menu.element.remove();
this.menu = null;
}
see forum: http://forum.jquery.com/topic/allow-cancelling-of-all-autocomplete-events
This requires adding a beforeclose event.