Opened 15 years ago

Last modified 13 years ago

#2924 review_failed New Feature

Adding support for special-key handler in dialog field definition

Reported by: Garry Yao Owned by: Garry Yao
Priority: Normal Milestone:
Component: UI : Dialogs Version: SVN (CKEditor) - OLD
Keywords: Cc:

Description

It's a common use case for user to define custom logic as handler for special-keystroke on dialog field, a example for this would be 'ENTER' key by default is handled as ok and close for the dialog, whereas in find/replace dialog it actually should mean by perform next search, and consider 'ESC' as one of other cases and on. After confirm with Martin, we'll introduce special key handlers in element definition API in simple form of:

{
	type: 'text',
	id: 'findReplaceTxt',
	accessKey: 'F',
	onEnterKey: function(evt)
	{
	  //do find 
	}
}

Other special keys could be defined gradually same as the onEnterKey handler later when necessary.

Attachments (2)

2924.patch (4.7 KB) - added by Garry Yao 15 years ago.
2924_2.patch (4.7 KB) - added by Garry Yao 15 years ago.
Fix extra comma

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by Garry Yao

Attachment: 2924.patch added

Changed 15 years ago by Garry Yao

Attachment: 2924_2.patch added

Fix extra comma

comment:1 Changed 15 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

Initiate with two keystroke:

  • Enter
  • Ctrl-Enter

comment:2 Changed 15 years ago by Frederico Caldeira Knabben

Component: GeneralUI : Dialogs
Milestone: CKEditor 3.0CKEditor 3.x

We should be reviewing the dialog system in the near future, so this ticket could be considered at that point.

comment:3 Changed 15 years ago by Alfonso Martínez de Lizarrondo

Version: SVN (FCKeditor)SVN (CKEditor)

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:5 Changed 13 years ago by Frederico Caldeira Knabben

Keywords: Confirmed removed
Status: reviewreview_failed

Better to have a generic "onKey" event handler at this point, which can handle any kind of key. It should work like the "key" event fired on the editor, passing the keystroke to the handler.

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