Skip to main content

Search and Top Navigation

#13653 closed bug (notabug)

Opened July 15, 2015 03:25PM UTC

Closed July 15, 2015 03:48PM UTC

br-tag inserted after destroying autocomplete dialog

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

I am applying autocomplete to a content editable <div>. After selecting an element from the autocomplete dialog and running autocomplete("destroy") a <br>-tag is automatically inserted at the end of the target div.

It can be reproduced with the following steps

1. Write something

2. Select something from the autocomplete dropdown

3. Place caret at end of content editable div

4. Insert a space

This makes a <br>-tag appear at the end of the content editable div.

The code to reproduce can be seen at the following URL: http://jsfiddle.net/qf5L0d27/

Attachments (0)
Change History (3)

Changed July 15, 2015 03:35PM UTC by scottgonzalez comment:1

owner: → petapetapeta
status: newpending

I'm not seeing that happen. Is this only in certain browsers?

The steps I used were:

  • Type "t"
  • Press down
  • Press enter
  • Move cursor to end of text with cmd+left
  • Type space

Changed July 15, 2015 03:43PM UTC by petapetapeta comment:2

status: pendingnew

I am using Firefox 39.0 on Windows 8.1 to trigger the issue. I have just attempted with Chrome and can see that the behaviour is not identical. There is however a   inserted at the end instead of a <br>.

I am using the following steps:

1. Type "t"

2. Click on test1 with the mouse

3. Click at the end of text using mouse to move cursor

4. Type space

Changed July 15, 2015 03:48PM UTC by scottgonzalez comment:3

resolution: → notabug
status: newclosed

This has absolutely nothing to do with the autocomplete. That's just how contenteditable works. Try the same thing without autocomplete at all and you'll get the same results.