src/cm/media/js/client/c_selection.js
changeset 558 5ba711a2bd06
parent 556 69503659fe8f
child 600 fda73ac53450
equal deleted inserted replaced
557:6005880ca8c7 558:5ba711a2bd06
    29 
    29 
    30 getSelectionInfo  = function () {
    30 getSelectionInfo  = function () {
    31   var startNode = null, endNode = null, startOffset = 0, endOffset = 0, text = '' ;
    31   var startNode = null, endNode = null, startOffset = 0, endOffset = 0, text = '' ;
    32   
    32   
    33   if (window.getSelection) { // everything else than IE
    33   if (window.getSelection) { // everything else than IE
       
    34 	// SID: if on safari_mobile get the previous meaningfull selection from a global variable set in text_view_comments.html
    34     var userSelection = safari_mobile ? storedSelection : window.getSelection ();
    35     var userSelection = safari_mobile ? storedSelection : window.getSelection ();
    35 
    36 
    36     if (userSelection.rangeCount > 0) {
    37     if (userSelection.rangeCount > 0) {
    37       var range = userSelection.getRangeAt(0) ;
    38       var range = userSelection.getRangeAt(0) ;
    38       text = range.toString() ;
    39       text = range.toString() ;