Ticket #3529: 3529_3.patch
File 3529_3.patch, 2.8 KB (added by , 16 years ago) |
---|
-
core/dom/text.js
94 94 95 95 // IE BUG: IE8 does not update the childNodes array in DOM after splitText(), 96 96 // we need to make some DOM changes to make it update. (#3436) 97 if ( CKEDITOR.env.ie && CKEDITOR.env.version >=8 )97 if ( CKEDITOR.env.ie8 ) 98 98 { 99 99 var workaround = new CKEDITOR.dom.text( '', doc ); 100 100 workaround.insertAfter( retval ); -
core/env.js
96 96 version = parseFloat( agent.match( /msie (\d+)/ )[1] ); 97 97 98 98 /** 99 * Indicate IE8 browser. 100 */ 101 env.ie8 = !!document.documentMode; 102 103 /** 104 * Indicte IE8 document mode. 105 */ 106 env.ie8Compat = document.documentMode == 8; 107 108 /** 109 * Indicates that CKEditor is running on an IE7-like environment, which 110 * includes IE7 itself and IE8's IE7 document mode. 111 * @type Boolean 112 */ 113 env.ie7Compat = ( ( version == 7 && !document.documentMode ) 114 || document.documentMode == 7 ); 115 116 /** 99 117 * Indicates that CKEditor is running on an IE6-like environment, which 100 118 * includes IE6 itself and IE7 and IE8 quirks mode. 101 119 * @type Boolean … … 105 123 */ 106 124 env.ie6Compat = ( version < 7 || env.quirks ); 107 125 108 /**109 * Indicate IE8.110 */111 env.ie8 = (version >= 8);112 126 } 113 127 114 128 // Gecko. -
tests/core/dom/text.html
10 10 <script type="text/javascript"> 11 11 //<![CDATA[ 12 12 13 CKEDITOR.test.addTestCase( (function() 13 var tc; 14 CKEDITOR.test.addTestCase( tc = (function() 14 15 { 15 16 // Local reference to the "assert" object. 16 17 var assert = CKEDITOR.test.assert; 17 18 18 19 return { 20 19 21 test_substring1 : function() 20 22 { 21 23 var text = new CKEDITOR.dom.text( '0123456789' ); … … 103 105 assert.areSame( text.$, next.$.previousSibling, 'sibling is wrong' ); 104 106 }, 105 107 108 test_split_3436 : function() 109 { 110 var parent = CKEDITOR.document.getById( 'playground2' ); 111 parent.setHtml( 'A B <b>C </b>D E' ); 112 parent.getFirst().split( 2 ); // Right before "B" 113 parent.getChildren().getItem( 3 ).split( 2 ); // Right before "E" 114 assert.areSame( 5, parent.getChildren().count(), 'Child nodes num doesn\'t match after split' ); 115 }, 116 106 117 name : document.title 107 118 }; 108 119 })() ); 109 120 121 //window.onload = tc.test_split_3436; 122 110 123 //]]> 111 124 </script> 112 125 </head> 113 126 <body> 114 <div id="playground"></p> 127 <p id="playground"></p> 128 <p id="playground2"></p> 115 129 </body> 116 130 </html>