title: After clicking on selected text, window selection is not giving updated range
body: <p>After double click, selection range can be obtained correctly on onclick event but when I again click on the selected text then updated selection range should be returned by window selection but this is not happening. Can anybody tell me if this is a bug in javascript selection or they have made it this way. And what could be the solution to get the updated range apart from timer.</p>
  
  <pre><code>&lt;div id="xyz" contenteditable="true"&gt;Hello world&lt;/div&gt;
  &lt;span class="status"&gt;Selected text : &lt;/span&gt;
  </code></pre>
  
  <p>javascript code :</p>
  
  <pre><code>function yourFunction() {
      if (window.getSelection) {
           var selectionRange = window.getSelection();
           $('.status').text(selectionRange.toString());
      }
  }
  
  $('#xyz').click(function () {
      $('.status').text('Mouse click');
      yourFunction();
  })
  </code></pre>
  
  <p>Example <a href="http://jsfiddle.net/zRr4s/20/" rel="noreferrer">here</a></p>