Revision: 99d1922d4402
Branch:   default
Author:   Pekka Klärck
Date:     Wed Apr 16 20:01:29 2014 UTC
Log:      Log: Cleaning up text selection.

Update issue 1689
Minor and hopefully final clean-up.
http://code.google.com/p/robotframework/source/detail?r=99d1922d4402

Modified:
 /src/robot/htmldata/rebot/log.js

=======================================
--- /src/robot/htmldata/rebot/log.js    Wed Apr 16 18:29:42 2014 UTC
+++ /src/robot/htmldata/rebot/log.js    Wed Apr 16 20:01:29 2014 UTC
@@ -161,18 +161,18 @@
 }

 function selectMessage(parentId) {
-    var element = $('#' + parentId).find('.message')[0];
+    var element = $('#' + parentId).find('.message').get(0);
     selectText(element);
 }

 function selectText(element) {
     // Based on http://stackoverflow.com/questions/985272
     var range, selection;
-    if (document.body.createTextRange) { //ms
+    if (document.body.createTextRange) {  // IE 8
         range = document.body.createTextRange();
         range.moveToElementText(element);
         range.select();
-    } else if (window.getSelection) { //all others
+    } else if (window.getSelection) {  // Others
         selection = window.getSelection();
         range = document.createRange();
         range.selectNodeContents(element);

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to