[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Overwriting default hotkeys  XML
Forum Index -> Development
Author Message
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hi everybody,

does anybody know how I can overwrite the default hotkey handling of the ESC button in a popup?

I have a popup dialog with an editable fixgrid inside.
After editing a field in the grid and than pressing ESC I would expect that the field loses focus or quits the edit mode.
But instead the popup closes completely without leaving the user a chance to save the data.

Now I would like to find a way to let the field handle the ESC event and not letting it being rooted to the popup.

Frauke
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi,

"escape" for closing popup dialogs is "by default" available - and cannot be switched off. Thousands of users like it already ;-) To be honest: I think that this is quite consistent (just opened a lot of popups both in the browser and in my office applications - always ESC is supported for leaving...)

Popups are not closed by the client automatically, but the closing always goes through the popup-listener that you pass when creating the popup (in the openPopup method). So this is the place where to check for changed data.

Regards, Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Hi Björn,

thanks for answering.

I agree absolutely with you concerning the closing of the popup.
But it is also common practice that you can leave the edit mode of a field with escape.

What I mean is:
I edit the field, then press ESC, then the field quits the edit mode and the old data remains in the field. But as I see, the field control does not support this anyway....

If you say there's no way, ok, I 'll accept that without insisting.
Just would have been nice.

Regards
Frauke


CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5520
Offline

Hi Frauke,

thanks for your understanding. To be honest, at least my browser does not take back field input on escape, but all this always depends from which application you come from ;-)

Just to emphasize: "dialogs" are automatically closed with "Escape", "frames" not. That#s our separation... (both are started with modal/modelsspopup - with frame you have to call setOpenasframe(true)).

And...: also for us the effort to add "do not close via escape" would be not toooo high. But it's one of these issues which add complexity to the system, and noone will remember anymore, why... OK, you will remember. With me, I am not 100% sure ;-)

Regards, Björn

Björn Müller, CaptainCasa GmbH
heyl

Power User

Joined: 10/01/2008 09:41:55
Messages: 267
Location: Ettlingen
Offline

Ok, than we leave it at that....

More than manipulating the popup I would have liked to have the field-escape functionality.
You are right. Some application support it, some don't....

Frauke
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team