Opened 11 years ago

Closed 9 years ago

#10839 closed Bug (fixed)

Image2: align center then align left/right throughs error

Reported by: Frederico Caldeira Knabben Owned by:
Priority: Normal Milestone:
Component: General Version: 4.3 Beta
Keywords: Cc:

Description

  1. Load the image2 sample.
  2. Remove the caption from the first image (in the dialog).
  3. Align the image "center" with the toolbar.
  4. Align the image "left" with the toolbar.

Nothing happens and a js error is thrown.

Attachments (1)

replacebycode7.html (7.4 KB) - added by Jakub Ś 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by Jakub Ś

Status: newconfirmed

Error:
Mesage: TypeError: wrapper is null
Code: wrapper.setStyle( 'float', align );
URI: ckeditor4/plugins/image2/plugin.js
Line: 499

comment:2 Changed 9 years ago by Owen

I get this error as soon as I select "Center" and press OK.

Uncaught TypeError: Cannot read property 'removeStyle' of null plugin.js?t=FB9E:802

comment:3 Changed 9 years ago by Jakub Ś

@okjimos I'm not able to reproduce it anymore.

Could you tell me which CKEditor version you use and what are the exact steps to reproduce this issue? It would be nice to see screencast as well.

comment:4 Changed 9 years ago by Jakub Ś

Status: confirmedpending

Can anyone reproduce this issue in latest CKEditor 4.5.6?

comment:5 Changed 9 years ago by Owen

Hi j.swiderski,

In my case, I seem to be causing the problem in a custom event handler:

widget.on('data', function(e) {
    // magic...
    widget.setData({src: src});
});

I fixed it by setting the entire data object:

widget.on('data', function(e) {
    e.data.src = 'newvalue';
    widget.setData(e.data);
});

I believe the first solution should be correct (the documentation isn't entirely clear, but seems to suggest it's possible to set single keys). Either way, it's a much lower priority issue.

Thanks, Owen

Changed 9 years ago by Jakub Ś

Attachment: replacebycode7.html added

comment:6 Changed 9 years ago by Jakub Ś

Resolution: fixed
Status: pendingclosed

Firt of all I'm sorry for late reply.

Second, I can't confirm your findings. Please put attached file into samples folder, wait 5 seconds, next remove caption (or not) and start aligning image. No errors are thrown.

@okjimos I will close this issue as fixed for now but if there is any way to reproduce this problem with default CKEditor please let me know.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy