Changeset 863
- Timestamp:
- 07/10/07 18:08:12 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
XinhaCore.js (modified) (3 diffs)
-
modules/GetHtml/DOMwalk.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r860 r863 2847 2847 { 2848 2848 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 #10192851 {2852 var r = this._doc.body.createTextRange();2853 setTimeout (function () { r.collapse(); r.select();},100); // won't do without timeout, dunno why2854 }2855 2849 } 2856 2850 … … 3141 3135 { 3142 3136 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 #10393137 var doc = this._doc; 3144 3138 3145 3139 editor.whenDocReady( … … 3156 3150 } 3157 3151 ); 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 } 3158 3170 3159 3171 // intercept some events; for updating the toolbar & keyboard handlers -
trunk/modules/GetHtml/DOMwalk.js
r821 r863 53 53 54 54 Xinha.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);};55 Xinha.elGetsNewLine = function (el) { return (" br hr meta link title ".indexOf(" " + el.tagName.toLowerCase() + " ") != -1);}; 56 56 57 57 Xinha.getHTMLWrapper = function(root, outputRoot, editor, indent) … … 304 304 else 305 305 { 306 html = Xinha.htmlEncode(root.data );306 html = Xinha.htmlEncode(root.data.trim()); 307 307 } 308 308 break;
