title: insertUnorderedList bug in Firefox
body: <p>I am building WYSIWYG editor. Currently I am working on inserting unordered lists. I am using <code>document.execCommand('insertUnorderedList')</code>. Below is demo:  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div[contenteditable] {
    width: 500px;
    height: 300px;
    border: 1px solid black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button onclick="document.execCommand('insertUnorderedList')"&gt;insert unordered list&lt;/button&gt;
  &lt;div contenteditable="true" spellcheck="false"&gt;&lt;p&gt;First line&lt;/p&gt;&lt;p&gt;Secound line&lt;/p&gt;&lt;p&gt;Third line&lt;/p&gt;&lt;p&gt;Fourth line&lt;/p&gt;&lt;p&gt;Fifth line&lt;/p&gt;&lt;p&gt;Sixth line&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Everything here is working, but I've found bug. I don't know if you have that too (because when I tried this in IE, instead of Firefox, everything works), but make an experiment:  </p>
  
  <pre><code>1. Select lines sixth, fifth and fourth (last three)
  2. Click button
  3. Select lines fifth, fourth and third
  4. Click button
  </code></pre>
  
  <p>After that you should see one <code>&lt;ul&gt;</code> with four <code>&lt;li&gt;</code> but I see something strange: a second list (<code>&lt;ul&gt;</code>) appeared. Like on image:<br>
  <a href="https://i.stack.imgur.com/Q37Cx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q37Cx.png" alt="enter image description here"></a></p>
  
  <p>I don't know how is it possible and how to repair it. If you know please help me. Thanks.</p>