title: window.getSelection not working is not working in IE11
body: <p>We started testing our application in IE11 and have noticed that window.getSelection() is not getting a selection in IE11 . I don't see any where that this property is not supported in IE11, and as per my understanding <code>window.getSelection</code> should work in all IE versions from 9.</p>
  
  <p>Has anyone else come across this issue? Am I missing something here ?</p>
  
  <p>I have created the below example which would work as expected in older version of IE and also in Chrome but not in IE11.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#selectButton').on('click', function() {
      $('#name').select();
      var sel = window.getSelection();
      alert("Slected value in text area : " + sel);
  
    }
  
  );</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form name='selectAll' id='selectAll'&gt;
    &lt;textarea id='name' name='name'&gt;Sample Value&lt;/textarea&gt;
    &lt;br&gt;
    &lt;input type='button' value='Click Me' id='selectButton' /&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>UPDATE</strong> - On further investigation I have figured out the window.getSelection() does exist in IE 11 but it will not work when the text selected is within an input field like text area. I also know that there used to be a similar bug in FF . At this point I am not sure whether this is a bug in IE or an expected behavior.</p>