Skip to content
Permalink
Browse files

Merge branch 't/11813'

  • Loading branch information...
oleq committed Apr 30, 2014
2 parents 06bdff1 + 05c6378 commit 1c28d47e7938e40615d847eaf1cdf68122a12910
Showing with 6 additions and 5 deletions.
  1. +1 −0 CHANGES.md
  2. +5 −5 plugins/image2/plugin.js
@@ -11,6 +11,7 @@ Fixed Issues:
* [#11801](http://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking [Enhanced Image](http://ckeditor.com/addon/image2) widget.
* [#11626](http://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](http://ckeditor.com/addon/tableresize) sets invalid width.
* [#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)).

Other changes:

@@ -325,7 +325,7 @@
// is destroyed and re-inited.
if ( !this.data.link ) {
if ( this.parts.link )
this.parts.link = null;
delete this.parts.link;
} else {
if ( !this.parts.link )
this.parts.link = this.parts.image.getParent();
@@ -373,10 +373,10 @@
// If we used 'a' in widget#parts definition, it could happen that
// selected element is a child of widget.parts#caption. Since there's no clever
// way to solve it with CSS selectors, it's done like that. (#11783).
this.parts.link = this.element.is( 'a' ) ?
this.element : this.element.getFirst( function( el ) {
return el.is( 'a' );
} );
var link = image.getAscendant( 'a' );

if ( link && this.wrapper.contains( link ) )
this.parts.link = link;

// Depending on configuration, read style/class from element and
// then remove it. Removed style/class will be set on wrapper in #data listener.

0 comments on commit 1c28d47

Please sign in to comment.
You can’t perform that action at this time.