1

This is piece of code from bookmarklet that I have in IE11. It supposes to pop up an alert box containing the text that you select or highlight in a page. It works as expected in desktop windows' IE11 but in WP's IE11 the alert box gives me blank message. Any idea why this happens and how I can fix it for WP's IE11?

javascript:(function(){var text="";if(document.getSelection){alert(document.getSelection().toString());}})();
Flint
  • 436
  • 1
  • 4
  • 15
  • Might be because not every browser supports JavaScript bookmarklets. – RickyAYoder Jul 22 '15 at 02:44
  • I don't think so because all my other js bookmarklets including the complex ones, work just fine in WP's IE11, except for this one – Flint Jul 22 '15 at 02:56
  • It seems that this is not IE specific problem but web browsers on touch device as general http://stackoverflow.com/questions/11628923/android-get-selected-text-on-touch-selection – Flint Jul 22 '15 at 04:29
  • That's what I meant; sorry I didn't clarify. Yeah, maybe they won't work on touch devices because of security issues. – RickyAYoder Jul 23 '15 at 01:57

0 Answers0