The editor.execCommand('cut') returns true instead of false, on IE
Whilst trying to make use of the existing 'cut' command, within the clipboard plugin, I encountered a problem where editor.execCommand('cut') was always returning true on IE, even though browser settings prevented automatic execution of cut/copy operations.
Delving a bit deeper, it looks like execIECommand() in the plugins/clipboard/plugin.js returns 0 or 1 which is eventually compared to false (using the !== operator) in core/command.js, line 52. Modifying execIECommand() to set enabled to false or true (instead of 0 or 1) seems to resolve the problem.
Change History (6)
| Status: |
new →
confirmed
|
| Version: |
3.6.2 →
3.4.2
|
| Owner: |
set to Jakub Ś
|
| Status: |
confirmed →
assigned
|
| Status: |
assigned →
review
|
| Component: |
General →
Core : Pasting
|
| Milestone: |
→ CKEditor 3.6.3
|
| Status: |
review →
review_passed
|
| Resolution: |
→ fixed
|
| Status: |
review_passed →
closed
|
REproducible from CKEditor 3.4.2 rev [5949]
Changing false/true
var enabled = false; var onExec = function() { enabled = true; };to 0/1
var enabled = 0; var onExec = function() { enabled = 1; };resulted in constant true being returned when comparing it to: