title: execCommand 'undo' not working properly in Internet Explorer
body: <p>In our project we are using Bootstrap WYSIWYG plugin (<a href="http://mindmup.github.io/bootstrap-wysiwyg/" rel="nofollow">http://mindmup.github.io/bootstrap-wysiwyg/</a>) and we are facing a problem with Internet Explorer. Although not officially supported, everything works in IE10 except the <b>'undo'</b> and <b>'redo'</b> actions. This plugin relies on <code>document.execCommand()</code> to execute all the actions the user needs.</p>
  
  <p>You can test the issue in the demo editor in the plugin's site. Making some debug if you click the undo button you can see that <code>document.execCommand('undo')</code> is called but nothing happens. However if you type the command in the console it does undo the last action.</p>
  
  <p>I was thinking if this was an IE problem (as this works perfectly on Chrome and FF), but  execCommand('undo') actually works -> <a href="http://jsfiddle.net/c8mq2/1/" rel="nofollow">http://jsfiddle.net/c8mq2/1/</a></p>
  
  <p>As we are using Backbone.js and in order to clarify wether if this was a plugin issue or not we dettached the undo button from the plugin and created a custom event like follows:</p>
  
  <p>Backbone View:</p>
  
  <pre><code>events: {           
          'click #undoAction': 'undoAction'
      },
  
  undoAction: function (e) {
          e.preventDefault();
          document.execCommand('undo');
      }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="btn-group"&gt;
  &lt;!-- undo dettached from plugin --&gt;
       &lt;a class="btn" id="undoAction"&gt;&lt;i class="icon-undo"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;!-- redo keeps attached to plugin's data-edit attribute --&gt;
       &lt;a class="btn" data-edit="redo" "&gt;&lt;i class="icon-repeat"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However no luck here neither, it seems it is not a plugin issue. What can be affecting to the IE's undo/redo stack that does not allow execCommand to work properly under some circumstances?</p>
  
  <p>I cannot think on a different and straighter way of calling the execCommand('undo') as in the last Backbone example. Any light on this would be highly appreciated!</p>
  
  <p><strong>UPDATE: New findings</strong></p>
  
  <p>I found a way to make the undo action work and maybe this can show what is happening, but still don't understand why (you can try this in the bootstrap wysiwyg demo page above) -> </p>
  
  <ol>
  <li>Click on the textarea and input some text. </li>
  <li>Click on the undo button </li>
  <li>Result: <strong>nothing happens</strong>. </li>
  <li>Click on the textarea again. </li>
  <li>Move the cursor to the undo button (don't click on it yet)</li>
  <li>Type some text without moving the cursor from the button.</li>
  <li>Click on the undo button</li>
  <li>Result: <strong>IT WORKS</strong></li>
  <li>Repeat steps 6 and 7 without moving the cursor and it will still work. </li>
  </ol>
  
  <p>It seems that hovering the cursor into the undo button breaks the undo/redo stack and that's what makes document.execCommand('undo') stop working properly on those cases. Is there any way to query that stack and see what is actually happening?</p>
  
  <p>Thanks in advance!</p>