Skip to main content

Search and Top Navigation

#5687 closed enhancement (wontfix)

Opened June 03, 2010 01:31AM UTC

Closed June 09, 2010 04:35PM UTC

Last modified October 11, 2012 09:15PM UTC

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.

Attachments (0)
Change History (3)

Changed June 03, 2010 01:36AM UTC by keithpitt comment:1

Already fixed this problem at: http://github.com/keithpitt/jquery-ui

Changed June 09, 2010 04:35PM UTC by jzaefferer comment:2

resolution: → wontfix
status: newclosed

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

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:3

milestone: TBD

Milestone TBD deleted