Opened 12 years ago

Closed 12 years ago

#9043 closed Bug (fixed)

undefined value afterCommandExec event

Reported by: the_fire_warrior Owned by: Jakub Ś
Priority: Normal Milestone: CKEditor 3.6.4
Component: General Version: 3.0
Keywords: Cc:

Description

I want to do something after I click the new page button. To handle the event I do :

this.on('afterCommandExec', handleAfterCommandExec);
function handleAfterCommandExec(event) {
    var commandName = event.data.name;
    ...
}

When I click on a button, commandName has a value (undo, redo, about, ...) but with the new page button, commandName is undefined.

Attachments (2)

9043.patch (390 bytes) - added by Jakub Ś 12 years ago.
9043_2.patch (435 bytes) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.33.0

Reproducible from CKEditor 3.0.

Changed 12 years ago by Jakub Ś

Attachment: 9043.patch added

comment:2 Changed 12 years ago by Jakub Ś

Owner: set to Jakub Ś
Status: confirmedreview

Could anyone verify if this is the correct way to fix this issue?

comment:3 Changed 12 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

There is no "name" property for the command object, in fact, so it is incorrect to create it in the command definition.

The right fix is to simply pass the string 'newpage' instead of command.name when firing "afterCommandExec" inside the newpage plugin.

Changed 12 years ago by Jakub Ś

Attachment: 9043_2.patch added

comment:4 Changed 12 years ago by Jakub Ś

Status: review_failedreview

Attempt no. 2

comment:5 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.6.4
Status: reviewreview_passed

comment:6 Changed 12 years ago by Jakub Ś

Resolution: fixed
Status: review_passedclosed

Fixed with [7503].

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