Opened 16 years ago
Closed 15 years ago
#4047 closed Bug (fixed)
[IE] Backspace button on control type trigger history backward
Reported by: | Garry Yao | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.1 |
Component: | UI : Enter Key | Version: | |
Keywords: | IE Review+ | Cc: |
Description
This's a migration of #327.
Reproducing Procedures
- Open the 'replace by class' sample page;
- Insert a control type( e.g. Image, form control, table ) and select it;
- Press 'Backspace';
- Actual Result: Browser history backward is triggered.
- Expected Result: The control is deleted from document.
Attachments (2)
Change History (11)
comment:1 Changed 16 years ago by
Milestone: | CKEditor 3.0 → CKEditor 3.1 |
---|
comment:2 Changed 15 years ago by
Owner: | set to Tobiasz Cudnik |
---|---|
Status: | new → assigned |
Changed 15 years ago by
Attachment: | 4047.patch added |
---|
comment:3 Changed 15 years ago by
Keywords: | Review? added |
---|
Changed 15 years ago by
Attachment: | 4047_2.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
Don't worry, there're no duplicate snapshots, since the default 'keydown' event ( which trigger the undo system ) has been canceled, though there were some issues with the previous patch, I'm pasting a new patch:
- The fix should be scoped to any control type element;
- Please use the standard way to cancel event;
comment:5 Changed 15 years ago by
For some reason the fix does't work for me in IE7. Patch applied but behavior is the same.
comment:6 Changed 15 years ago by
Owner: | changed from Tobiasz Cudnik to Garry Yao |
---|---|
Status: | assigned → new |
comment:7 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|---|
Status: | new → assigned |
comment:8 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
Good one... on commit, just to make it a bit smaller and mainly more readable:
var control = event.data.keyCode == 8 && editor.getSelection().getSelectedElement(); if ( control )
I think it's proper place for this fix. Only one thing worries me - double saveSnapshot event. I think it won't create redundant image, but it's because editor is not taking snapshot at start.