Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11364 closed Bug (fixed)

Widget image2 : Cannot set property 'previous' of null

Reported by: Franck Valentin Owned by:
Priority: Normal Milestone:
Component: UI : Widgets Version: 4.3
Keywords: Cc:

Description

In some cases the widget 'image2' throws the error "Uncaught TypeError: Cannot set property 'previous' of null".

To reproduce it: In the source mode add (code generated from the widget):

<div style="text-align:center">
<div style="text-align:center"><img alt="" height="48" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Image-x-generic.svg/48px-Image-x-generic.svg.png" width="48" /></div>
</div>

When switching to the wysiwyg mode the error is thrown and no commands are available anymore. It seems that the problem only occurs when the option 'center' is selected.

Change History (3)

comment:1 Changed 5 years ago by Karthik D

Issue seems to come from line

if ( isCenterWrapper( el ) ) {

if ( name == 'div' ) {

var figure = el.getFirst( 'figure' ); el.replaceWith( figure ); el = figure;

}

This issue seems to be fixed with latest master image2 plugin https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/image2/plugin.js

Last edited 5 years ago by Karthik D (previous) (diff)

comment:2 Changed 5 years ago by Piotrek Koszuliński

Resolution: fixed
Status: newclosed

Fixed by #11283 in CKEditor 4.3.2.

comment:3 Changed 5 years ago by Piotrek Koszuliński

Version: 4.3.14.3
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy