Open GoogleCodeExporter opened 9 years ago
Ups... just for complete the "What is the expected output?":
- I made a test that when the user press any key on canvas will appear a
gxt Info widget specifiyng the event ocurred...
When I test on Hosted Mode everythings works fine, for instance, if I click
with
mouse appears the Info Widget saying "Mouse Down - You click on Canvas" and if
a
press any key it appears two Info widgets saying "KeyPress - KeyPress on canvas"
and "KeyDown - KeyDown on canvas"...
But when I compile to Web Mode the mouse events works fine and the key events
just
don't work...
Original comment by cris.gon...@gmail.com
on 25 Oct 2009 at 11:18
Tested with GWT 2.0.3, gwt-incubator-20100204-r1747.jar and found this still
not to
be working. Added handlers for keyup, keydown and keypressed, none are called.
public class Canvas extends GWTCanvas
{
...
public HandlerRegistration addKeyDownHandler(KeyDownHandler handler)
{
return addDomHandler(handler, KeyDownEvent.getType());
}
public HandlerRegistration addKeyUpHandler(KeyUpHandler handler)
{
return addDomHandler(handler, KeyUpEvent.getType());
}
public HandlerRegistration addKeyPressHandler(KeyPressHandler handler)
{
return addDomHandler(handler, KeyPressEvent.getType());
}
}
...
handlers:
public void onKeyUp(KeyUpEvent event)
{
Window.alert(event.toDebugString());
...
}
@Override
public void onKeyDown(KeyDownEvent event)
{
Window.alert(event.toDebugString());
...
}
@Override
public void onKeyPress(KeyPressEvent event)
{
Window.alert(event.toDebugString());
...
}
Original comment by gepe...@gmail.com
on 4 Apr 2010 at 8:18
Original issue reported on code.google.com by
cris.gon...@gmail.com
on 25 Oct 2009 at 11:10