Ticket #4047 (closed Bug: fixed)

Opened 14 months ago

Last modified 11 months ago

[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

4047.patch Download (1.9 KB) - added by tobiasz.cudnik 12 months ago.
4047_2.patch Download (1.1 KB) - added by garry.yao 12 months ago.

Change History

Changed 14 months ago by fredck

  • milestone changed from CKEditor 3.0 to CKEditor 3.1

Changed 12 months ago by tobiasz.cudnik

  • owner set to tobiasz.cudnik
  • status changed from new to assigned

Changed 12 months ago by tobiasz.cudnik

Changed 12 months 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 12 months ago by garry.yao

Changed 12 months 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;

Changed 12 months ago by homestar9

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

Changed 11 months ago by garry.yao

  • owner changed from tobiasz.cudnik to garry.yao
  • status changed from assigned to new

Changed 11 months ago by garry.yao

  • keywords Review? added; Review- removed
  • status changed from new to assigned

Changed 11 months 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 )

Changed 11 months ago by garry.yao

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [4347].

Note: See TracTickets for help on using tickets.