Opened 15 years ago

Closed 14 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

  1. Open the 'replace by class' sample page;
  2. Insert a control type( e.g. Image, form control, table ) and select it;
  3. Press 'Backspace';
    • Actual Result: Browser history backward is triggered.
    • Expected Result: The control is deleted from document.

Attachments (2)

4047.patch (1.9 KB) - added by Tobiasz Cudnik 15 years ago.
4047_2.patch (1.1 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 15 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.0CKEditor 3.1

comment:2 Changed 15 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: newassigned

Changed 15 years ago by Tobiasz Cudnik

Attachment: 4047.patch added

comment:3 Changed 15 years ago by Tobiasz Cudnik

Keywords: Review? added

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.

Changed 15 years ago by Garry Yao

Attachment: 4047_2.patch added

comment:4 Changed 15 years ago by Garry Yao

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:

  1. The fix should be scoped to any control type element;
  2. Please use the standard way to cancel event;

comment:5 Changed 15 years ago by Dave Levin

For some reason the fix does't work for me in IE7. Patch applied but behavior is the same.

comment:6 Changed 14 years ago by Garry Yao

Owner: changed from Tobiasz Cudnik to Garry Yao
Status: assignednew

comment:7 Changed 14 years ago by Garry Yao

Keywords: Review? added; Review- removed
Status: newassigned

comment:8 Changed 14 years ago by Frederico Caldeira Knabben

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 )

comment:9 Changed 14 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [4347].

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