#5687 closed enhancement (wontfix)
Cancellable beforeClose event in the Autocompletor
Reported by: | keithpitt | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.autocomplete | Version: | 1.8.1 |
Keywords: | beforeClose event cancel | Cc: | |
Blocked by: | Blocking: |
Description
At the moment, there is no way to cancel the closing of the autocomplete menu after it opens. A use case for this is:
1) Member types something into the box 2) Autocomplete menu appears 3) User cannot navigate away from the text field until a selection is made.
Change History (3)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We're not going to implement this based on your usecase. Forcing the user to fill out a field with no escape isn't something we want to support.
Anyway, to avoid having to modify the UI source code, you could do this:
$.widget("keithpitt.forcedAutocomplete", $.ui.autocomplete, { close: function() { // some condition here $.ui.autocomplete.prototype.close.apply(this, arguments); } });
jsbin example: http://jsbin.com/uyaco3/edit
Note: See
TracTickets for help on using
tickets.
Already fixed this problem at: http://github.com/keithpitt/jquery-ui