Skip to main content

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.

Attachments (0)
Change History (4)

Changed February 04, 2014 07:51PM UTC by Yermo2 comment:1

Changed February 05, 2014 01:21PM UTC by tj.vantoll comment:2

status: newopen

Changed July 24, 2014 09:01PM UTC by Yermo Lamers comment:3

resolution: → fixed
status: openclosed

Autocomplete: ESCAPE should not change content of a MultiLine

Fixes #9790

Closes gh-1190

Changeset: 930bc7df666c997add9978d3cc3139559e71ae77

Changed July 24, 2014 09:01PM UTC by scottgonzalez comment:4

milestone: none1.11.1