Search and Top Navigation
#9790 closed bug (fixed)
Opened February 04, 2014 07:43PM UTC
Closed July 24, 2014 09:01PM UTC
Last modified July 24, 2014 09:01PM UTC
Autocomplete: Input value should not be set in MultiLine when ESCAPE is pressed
Reported by: | Yermo2 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.1 |
Component: | ui.autocomplete | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This bug is similar to http://bugs.jqueryui.com/ticket/9771 in that the value of a multiline input (contenteditable or textarea) is changed when ESCAPE is pressed to close the menu.
See this fiddle http://jsfiddle.net/2256A/. Press ESCAPE after the menu is opened. Notice that the cursor position is moved to the beginning of the contenteditable.
The correct behavior should be that the content is not changed.
The change I suggest is in the ESCAPE handler in ui/autocomplete.js line 134 change to:
if ( ! this.isMultiLine ) { this._value( this.term ); }
I have a patch and unit test that I will submit shortly.
Pull request sent https://github.com/jquery/jquery-ui/pull/1190