Skip to content

Commit

Permalink
Merge branch 't/13232'
Browse files Browse the repository at this point in the history
  • Loading branch information
adelura committed May 18, 2015
2 parents a521779 + c96865b commit 7157492
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#13232](http://dev.ckeditor.com/ticket/13232): [Safari] Fixed: Method [`element.appendText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-appendText) work properly for empty elements.
* [#13233](http://dev.ckeditor.com/ticket/13233): Fixed: HTMLDataProcessor can process `foo:href` attributes.
* [#12899](http://dev.ckeditor.com/ticket/12899): Fixed: Corrected wrong tag ending for horizontal box definition in the [Dialog User Interface](http://ckeditor.com/addon/dialogui) plugin. Thanks to [mizafish](https://github.com/mizafish)!
* [#13254](http://dev.ckeditor.com/ticket/13254): Fixed: Cannot outdent block after indent when using [Divarea](http://ckeditor.com/addon/divarea) plugin. Thanks to [Jonathan Cottrill](https://github.com/jcttrll)!
Expand Down
5 changes: 3 additions & 2 deletions core/dom/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@ CKEDITOR.dom.element.clearMarkers = function( database, element, removeFromDatab
* // Result: '<p>This is some text</p>'
*
* @param {String} text The text to be appended.
* @returns {CKEDITOR.dom.node} The appended node.
*/
appendText: function( text ) {
if ( this.$.text != null )
// On IE8 it is impossible to append node to script tag, so we use its text.
// On the contrary, on Safari the text property is unpredictable in links. (#13232)
if ( this.$.text != null && CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
this.$.text += text;
else
this.append( new CKEDITOR.dom.text( text ) );
Expand Down
7 changes: 7 additions & 0 deletions tests/core/dom/element/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ bender.test( appendDomObjectTests(
assert.areEqual( 'Test appendText', element.$.text );
},

// #13232
'test appendText to link': function() {
var element = newElement( 'a' );
element.appendText( '@' );
assert.areEqual( '@', element.getText() );
},

test_setHtml: function() {
var element = newElement( document.getElementById( 'append' ) );
element.setHtml( '<b>Test</b>' );
Expand Down

0 comments on commit 7157492

Please sign in to comment.