Opened 7 years ago

Closed 7 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 7 years ago.
4047_2.patch (1.1 KB) - added by garry.yao 7 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by fredck

  • Milestone changed from CKEditor 3.0 to CKEditor 3.1

comment:2 Changed 7 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from new to assigned

Changed 7 years ago by tobiasz.cudnik

comment:3 Changed 7 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 7 years ago by garry.yao

comment:4 Changed 7 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 7 years ago by homestar9

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

comment:6 Changed 7 years ago by garry.yao

  • Owner changed from tobiasz.cudnik to garry.yao
  • Status changed from assigned to new

comment:7 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed
  • Status changed from new to assigned

comment:8 Changed 7 years ago by fredck

  • 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 7 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [4347].

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy