Voog / wysihtml

Open source rich text editor for the modern web

Home Page:http://wysihtml.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toggling bold on ordered list items causing separate ol tags to be created for each list item

claire-lee opened this issue · comments

I found an issue where, toggling bold on an ordered list is causing extra ordered list elements to be created. Managed to reproduce in Chrome and Safari.

Steps to reproduce

  1. Click the bold button, type some text, and hit enter
  2. Click the numbered list button and create a few list items
  3. Highlight the new list items and toggle off the bold button

Expected results
This should result in an unbolded list, with the list items being numbered consecutively:
<ol><li>one</li><li>two</li><li>three</li></ol>

Actual results
This results in three separate ordered list tags being created, which each of them being numbered 1:
<ol><li>one</li></ol><ol><li>two</li></ol><ol><li>three</li></ol>

Also leaving the list items highlighted and toggling the bold/ordered list on and off repeatedly causes new empty list items to be created.