Changeset 863


Ignore:
Timestamp:
07/10/07 18:08:12 (7 years ago)
Author:
ray
Message:
  • Ticket #1019 Cusor not jumping to editable part of window when clicked in IE7
  • Ticket #1046 Error in IE 6 when switching from text to wysiwyg
  • DOMwalk: linebreaks inserted before <br />s
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r860 r863  
    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     } 
    28552849  } 
    28562850 
     
    31413135{ 
    31423136  var editor=this; 
    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 
     3137  var doc = this._doc; 
    31443138 
    31453139  editor.whenDocReady( 
     
    31563150        } 
    31573151      ); 
     3152      if (Xinha.is_ie) 
     3153      { // #1019 Cusor not jumping to editable part of window when clicked in IE, see also #1039 
     3154        Xinha._addEvent( 
     3155        editor._doc.getElementsByTagName("html")[0], 
     3156        "click", 
     3157          function() 
     3158          { 
     3159            if (editor._iframe.contentWindow.event.srcElement.tagName.toLowerCase() == 'html') // if  clicked below the text (=body), the text cursor does not appear, see #1019 
     3160            { 
     3161               var r = editor._doc.body.createTextRange(); 
     3162               r.collapse();   
     3163               r.select() 
     3164               //setTimeout (function () { r.collapse();  r.select();},100); // won't do without timeout, dunno why 
     3165             } 
     3166             return true; 
     3167          } 
     3168        ); 
     3169      } 
    31583170 
    31593171      // intercept some events; for updating the toolbar & keyboard handlers 
  • trunk/modules/GetHtml/DOMwalk.js

    r821 r863  
    5353 
    5454Xinha.emptyAttributes = " checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade "; 
    55 Xinha.elGetsNewLine = function (el) { return (" br meta link title ".indexOf(" " + el.tagName.toLowerCase() + " ") != -1);}; 
     55Xinha.elGetsNewLine = function (el) { return (" br hr  meta link title ".indexOf(" " + el.tagName.toLowerCase() + " ") != -1);}; 
    5656 
    5757Xinha.getHTMLWrapper = function(root, outputRoot, editor, indent) 
     
    304304      else 
    305305      { 
    306         html = Xinha.htmlEncode(root.data); 
     306        html = Xinha.htmlEncode(root.data.trim()); 
    307307      } 
    308308    break; 
Note: See TracChangeset for help on using the changeset viewer.