Skip to main content

Search and Top Navigation

#9695 closed bug (wontfix)

Opened December 06, 2013 04:58PM UTC

Closed January 09, 2014 12:55AM UTC

Last modified February 08, 2016 03:44PM UTC

Autocomplete: should not allow to select a disabled item of its menu with the ENTER key

Reported by: paftek75 Owned by: paftek75
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

http://jsbin.com/AyuNiyem/2 (press "a", move with arrow keys and select with ENTER)

Disabled cannot be selected with the mouse (the embedded menu widget is doing right here) but is it possible with the keyboard.

Maybe calls of "this.menu.select( event )" should by surrounded by a check of the state of "this.menu.active" ?

Attachments (0)
Change History (5)

Changed December 09, 2013 01:53PM UTC by tj.vantoll comment:1

status: newopen
summary: Autocomplete should not allow to select a disabled item of its menu with the ENTER keyAutocomplete: should not allow to select a disabled item of its menu with the ENTER key

I'm going to mark this as valid as it seems like a legitimate use case and problem to me. At the very least we could make it easy to extend autocomplete to change this behavior; currently it's embedded in a

keydown
handler deep within
_create()
.

Changed January 08, 2014 06:00AM UTC by robotdan comment:2

Changed January 09, 2014 12:52AM UTC by scottgonzalez comment:3

owner: → paftek75
status: openpending

Here's a one-off implementation showing how to do this with the standard public API: http://jsbin.com/AyuNiyem/4/edit

Changed January 09, 2014 12:55AM UTC by scottgonzalez comment:4

resolution: → wontfix
status: pendingclosed

And here's an extension that doesn't even let the focus or select events occur for disabled items: http://jsbin.com/AyuNiyem/5/edit

Changed February 08, 2016 03:44PM UTC by scottgonzalez comment:5

#14915 is a duplicate of this ticket.