Changeset 860


Ignore:
Timestamp:
06/25/07 19:34:27 (7 years ago)
Author:
ray
Message:
  • Ticket #1039 Firefox full page adds multiple paragraphs after view source
  • Ticket #1019 Cusor not jumping to editable part of window when clicked in IE7
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r834 r860  
    28442844    } catch (ex) {} 
    28452845  } 
    2846   else if ( !Xinha.is_gecko && this._doc.body.contentEditable !== true ) 
     2846  else if ( Xinha.is_ie&& this._doc.body.contentEditable !== true ) 
    28472847  { 
    28482848    this._doc.body.contentEditable = true; 
     2849 
     2850    if (this._iframe.contentWindow.event.srcElement.tagName.toLowerCase() == 'html') // if  clicked below the text (=body), the text cursor does not appear, see #1019  
     2851    { 
     2852      var r = this._doc.body.createTextRange(); 
     2853      setTimeout (function () { r.collapse();  r.select();},100); // won't do without timeout, dunno why 
     2854    } 
    28492855  } 
    28502856 
     
    31353141{ 
    31363142  var editor=this; 
    3137   var doc=this._doc.getElementsByTagName("html")[0]; 
     3143  var doc = (Xinha.is_ie) ? this._doc.getElementsByTagName("html")[0] : this._doc; // #1019 Cusor not jumping to editable part of window when clicked in IE, see also #1039 
     3144 
    31383145  editor.whenDocReady( 
    31393146    function() 
Note: See TracChangeset for help on using the changeset viewer.