Opened 14 years ago
Closed 14 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)
Change History (8)
comment:1 Changed 14 years ago by
| Status: | new → confirmed |
|---|---|
| Version: | 3.6.3 → 3.0 |
Changed 14 years ago by
| Attachment: | 9043.patch added |
|---|
comment:2 Changed 14 years ago by
| Owner: | set to Jakub Ś |
|---|---|
| Status: | confirmed → review |
Could anyone verify if this is the correct way to fix this issue?
comment:3 Changed 14 years ago by
| Status: | review → review_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 14 years ago by
| Attachment: | 9043_2.patch added |
|---|
comment:5 Changed 14 years ago by
| Milestone: | → CKEditor 3.6.4 |
|---|---|
| Status: | review → review_passed |
comment:6 Changed 14 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Fixed with [7503].

Reproducible from CKEditor 3.0.