Peter Robinson schrieb:
> Hello,
>  
> I have Qooxdoo 0.7.3 application that displays database records to the 
> user. I've setup a couple of qx.client.Command with shortcuts to 
> delete the current record ("DEL") and view details about the current 
> record ("ENTER") and hooked up corresponding toolbar buttons and menu 
> options to these commands.
>  
> The problem comes about because I also have a text field which allows 
> my user to search for database records. If the user types in this 
> field and happens to hit "DEL" or "ENTER" (which is likely), the 
> associated command is invoked instead of my seach action (which I'd 
> like to invoke on a "keydown" event when the user hits enter in the 
> text field).
>  
> Shouldn't the widget in focus get a chance to handle the key event 
> first (and stop its propagation) before falling back to the global 
> command's execute? I looked at qx.event.handler.EventHandler and it 
> looks like it the following check is done before it dispatches the 
> event to other listeners:
>  
> // Check for commands
> if (vType == "keydown") {
> this._checkKeyEventMatch(vKeyEventObject);
> }
>  
> Is there a way around this? I'd rather not change my shortcuts.
>  
> Thank you,
>  
> Peter
>  
Hi Peter,

I think you are right about this. Widget code should be able to prevent 
commands from being executed. Since this would mean a significant change 
in the semantics of commands I think we will not adress this issue in 
the 0.7 branch but it will be fixed in 0.8.

For the time being, I think you have to disable the command if you focus 
your text field and enable it again on blur.

Best Fabian

-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, 
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to