#9695 closed bug (wontfix)
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" ?
Change History (5)
comment:1 Changed 9 years ago by
Status: | new → open |
---|---|
Summary: | Autocomplete should not allow to select a disabled item of its menu with the ENTER key → Autocomplete: should not allow to select a disabled item of its menu with the ENTER key |
comment:2 Changed 9 years ago by
https://github.com/jquery/jquery-ui/pull/1163
Updated test case w/ patch from pull request. http://jsfiddle.net/robotdan/j93LM/
comment:3 Changed 9 years ago by
Owner: | set to paftek75 |
---|---|
Status: | open → pending |
Here's a one-off implementation showing how to do this with the standard public API: http://jsbin.com/AyuNiyem/4/edit
comment:4 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | pending → closed |
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
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()
.