Home » Eclipse Projects » Remote Application Platform (RAP) » Key events in Firefox(Some keys don't seem to trigger key events in Firefox)
|
Re: Key events in Firefox [message #534147 is a reply to message #534003] |
Tue, 18 May 2010 08:33 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Hi,
key listeners in RAP are there to support cell editors, we are aware
that some keys do not work correctly due to cross-browser issues. Feel
free to file a bug anyway.
Regards, Ralf
tibersept wrote:
> Hello,
>
> so I have a text widget with a key listener that listens for the first
> key pressed, in order to check whether text data is really editable or
> not. I can't change that behavior. In case of a positive outcome the
> listener removes itself.
> In general, this works fine, but when the user decides to select parts
> of the text and presses the Delete key, the key listener is never
> informed of that fact. This behavior is Firefox (3.6.3) specific, other
> browser like Chrome or IE do send the key event.
> Is that desired behavior, am I missing something ? Qooxdoo seems to
> cope fine with registering the "keydown" event. Any idea of what is wrong ?
>
> Thanks for your help in advance
>
>
|
|
|
Re: Key events in Firefox [message #534174 is a reply to message #534147] |
Tue, 18 May 2010 09:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Tiber Sept![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=tibersept%40yahoo.com) Messages: 32 Registered: February 2010 |
Member |
|
|
Hi Ralf,
I've seen that the issue is not so trivial, had a look at the two KeyEventUtil
classes org.eclipse.rwt.AsyncKeyEventUtil and org.eclipse.rwt.SyncKeyEventUtil,
although I don't understand the flow exactly. I will not file a bug because the issue is well
documented.
Anyway, I need a solution and ModifyListener does not work for me, so I have extended
the RAP Text widget org.eclipse.rwt.widgets.Text and added a keydown listener. The
corresponding method checks for a specific browser + a specific key ( only if key listeners
have been added to the text widget ) and sends a Request (sendSynchronous) with
keyCode, charCode, and modifier set .
This almost works, only problem being that the the last char of the text value appears
at the selection start, so the resulting text value has to be truncated.
Could you point me to why this is happening, and, in general, to a better approach.
Thanks & Regards
[Updated on: Tue, 18 May 2010 11:25] Report message to a moderator
|
|
|
Re: Key events in Firefox [message #534301 is a reply to message #534174] |
Tue, 18 May 2010 15:26 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Hi tibersept,
our KeyEvents implementation is complicated and differs between browsers
because of the fact that KeyEvents can be discarded in a Listener. I
think using a ModifyListener would be preferable, why doesn't it work
for you? Can you explain your use-case a bit more?
If you have a custom widget or some kind widget patch in Javascript you
should make sure that you have no KeyListener attached to these widgets
but use some custom communication instead because the KeyEventsUtil
interrupts the flow of events to allow for the server-side veto.
HTH, Ralf
tibersept wrote:
> Hi Ralf,
>
> I've seen that the issue is not so trivial, had a look at the two
> KeyEventUtil classes org.eclipse.rwt.AsyncKeyEventUtil and
> org.eclipse.rwt.SyncKeyEventUtil, although I don't understand the flow
> exactly. I will not file a bug because the issue is well documented.
>
> Anyway, I need a solution and ModifyListener does not work for me, so I
> have extended the RAP Text widget org.eclipse.rwt.widgets.Text and added
> a keydown listener. The corresponding method checks for a specific
> browser + a specific key ( only if key listeners have been added to the
> text widget ) and sends a Request (sendSynchronous) with keyCode,
> charCode, and modifier set .
> This almost works for the Delete key, only problem being that the the
> last char of the selection is not deleted anymore, so the resulting text
> value has to be truncated. Could you point me to why this is
> happening, and, in general, to a better approach.
>
> Thanks & Regards
|
|
| |
Goto Forum:
Current Time: Sun Sep 01 02:24:38 GMT 2024
Powered by FUDForum. Page generated in 0.04174 seconds
|