Skip to content
Permalink
Browse files

Merge branch 't/11839'

  • Loading branch information...
Reinmar committed May 1, 2014
2 parents 53f341e + be0cfb4 commit 0e78956f32dbe8e099acc5888c2ab317cf3d4dbd
Showing with 10 additions and 0 deletions.
  1. +1 −0 CHANGES.md
  2. +9 −0 plugins/sourcearea/plugin.js
@@ -13,6 +13,7 @@ Fixed Issues:
* [#11872](http://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-addClass) chainable symmetrically to [`element.removeClass()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-removeClass).
* [#11813](http://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting captioned image and restoring undo snapshot ([Enhanced Image](http://ckeditor.com/addon/image2)).
* [#11814](http://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in [Enhanced Image](http://ckeditor.com/addon/image2) context menu.
* [#11839](http://dev.ckeditor.com/ticket/11839): Fixed: [IE9] Caret jumps out of editable when resizing editor in source mode.

Other changes:

@@ -77,14 +77,23 @@
editor.getCommand( 'source' ).setState( editor.mode == 'source' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
} );

var needsFocusHack = CKEDITOR.env.ie && CKEDITOR.env.version == 9;

function onResize() {
// We have to do something with focus on IE9, because if sourcearea had focus
// before being resized, the caret ends somewhere in the editor UI (#11839).
var wasActive = needsFocusHack && this.equals( CKEDITOR.document.getActive() );

// Holder rectange size is stretched by textarea,
// so hide it just for a moment.
this.hide();
this.setStyle( 'height', this.getParent().$.clientHeight + 'px' );
this.setStyle( 'width', this.getParent().$.clientWidth + 'px' );
// When we have proper holder size, show textarea again.
this.show();

if ( wasActive )
this.focus();
}
}
} );

0 comments on commit 0e78956

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.