Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » KeyEvent management differs depending browser(retun key keyEvent not sent on ie, safari and chrome)
KeyEvent management differs depending browser [message #766084] Thu, 15 December 2011 08:01 Go to next message
bertram  is currently offline bertram Friend
Messages: 6
Registered: December 2011
Junior Member
Hi,

after creating a check button , and adding a keyListener on this one, i don't have the same behaviour when hitting the return key when the button has the focus:

on Opera and Firefox :
- the methods keyPressed and keyReleased of the listener are called

on IE, Chrome, and Safari :
- None of these methods are called.

Note : when hitting alpha numeric caracters, the keyEvent is sent.

How can i do for sending the return key keyEvent ?

Thanks,
Bertram
Re: KeyEvent management differs depending browser [message #766098 is a reply to message #766084] Thu, 15 December 2011 08:26 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Bertram,
what is the use case of adding a key listener to the check button? If you want to be notified when check button is selected, use selection listener. The check button changes its state (selected/deselected) by using ENTER or SPACE.
Best,
Ivan
Re: KeyEvent management differs depending browser [message #766102 is a reply to message #766084] Thu, 15 December 2011 08:27 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Bertram,
what is the use case of adding a key listener to the check button? If you want to be notified when check button is selected, use selection listener. The check button changes its state (selected/deselected) by using ENTER or SPACE.
Best,
Ivan
Re: KeyEvent management differs depending browser [message #766110 is a reply to message #766098] Thu, 15 December 2011 08:44 Go to previous messageGo to next message
bertram  is currently offline bertram Friend
Messages: 6
Registered: December 2011
Junior Member
Hi Yvan,

thanks for the quick reply.

I've got a login dialog with a composite containing :
- a button for connection
- a group with
- a text login
- a text password
- a check buton for administrator

with the tab navigation when i focus the check button, and with the space button i can can change the selection of the check button. without focusing the connection button, i want to select the connection button when hitting the return key.

so waht i do was : add a keylistener on the check button, and if the keycode is equal to SWT.CR, i send a selection Event on the connction button.

This works on FF and opera, but not in IE , Safari and Chrome.

Can you tell me what is the correct behaviour ?

If there is no solution, i will change the check button by a combo box.


Thanks
Bertram

Re: KeyEvent management differs depending browser [message #766115 is a reply to message #766102] Thu, 15 December 2011 08:44 Go to previous messageGo to next message
bertram  is currently offline bertram Friend
Messages: 6
Registered: December 2011
Junior Member
Hi Yvan,

thanks for the quick reply.

I've got a login dialog with a composite containing :
- a button for connection
- a group with
- a text login
- a text password
- a check buton for administrator

with the tab navigation when i focus the check button, and with the space button i can can change the selection of the check button. without focusing the connection button, i want to select the connection button when hitting the return key.

so waht i do was : add a keylistener on the check button, and if the keycode is equal to SWT.CR, i send a selection Event on the connction button.

This works on FF and opera, but not in IE , Safari and Chrome.

Can you tell me what is the correct behaviour ?

If there is no solution, i will change the check button by a combo box.


Thanks
Bertram
Re: KeyEvent management differs depending browser [message #766119 is a reply to message #766115] Thu, 15 December 2011 08:52 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Bertram,
the current implementation of key events has some drawbacks. We have plans to address them soon. Please file a bugzilla [1] about this cross-browser inconsistency.
[1] http://www.eclipse.org/rap/bugs/
Thanks,
Ivan
Re: KeyEvent management differs depending browser [message #766122 is a reply to message #766115] Thu, 15 December 2011 08:53 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Bertram,
the current implementation of key events has some drawbacks. We have plans to address them soon. Please file a bugzilla [1] about this cross-browser inconsistency.
[1] http://www.eclipse.org/rap/bugs/
Thanks,
Ivan
Re: KeyEvent management differs depending browser [message #766132 is a reply to message #766122] Thu, 15 December 2011 09:06 Go to previous message
bertram  is currently offline bertram Friend
Messages: 6
Registered: December 2011
Junior Member
Ok Ivan,

done : bug id : 366788

thanks,
Bertram
Previous Topic:RAP war file url
Next Topic:how to evaluate the data to open flash chart in my custom widget?
Goto Forum:
  


Current Time: Sat Oct 23 03:01:16 GMT 2021

Powered by FUDForum. Page generated in 0.02018 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top