Opened 7 years ago

Closed 7 years ago

#13653 closed bug (notabug)

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:


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:

Change History (3)

comment:1 Changed 7 years ago by Scott González

Owner: set to 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

comment:2 Changed 7 years ago by petapetapeta

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 &nbsp; 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

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

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.

Note: See TracTickets for help on using tickets.