Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#9790 closed bug (fixed)

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.

Change History (4)

comment:2 Changed 4 years ago by tj.vantoll

Status: newopen

comment:3 Changed 3 years ago by Yermo Lamers

Resolution: fixed
Status: openclosed

Autocomplete: ESCAPE should not change content of a MultiLine

Fixes #9790 Closes gh-1190

Changeset: 930bc7df666c997add9978d3cc3139559e71ae77

comment:4 Changed 3 years ago by Scott González

Milestone: none1.11.1
Note: See TracTickets for help on using tickets.