| Summary: | No key event on text widget for SWT.ARROW_DOWN and SWT.ARROW_UP | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Stefan Sommer <tonprince> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan, rsternberg, stephan.leichtvogt, tbuschto |
| Version: | 1.3 | ||
| Target Milestone: | 1.5 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 225764 | ||
| Bug Blocks: | 330461 | ||
This is only a FF issue, isn't it? This is a known limitation of the key events implementation under FF (AsyncKeyEventUtil.js). There is no an easy fix and maybe we will not solve it in the close future. Is there another way to handle arrow down events in a text field? I would like to set the focus to the popup shell for text completion. Stefan, In FF this is currently not possible without breaking something else. Stefan, are you using the JFace FieldAssist or a custom implementation? Maybe we could handle this case in the JFace layer... Yes, I am using the JFace field assist and would like to solve it there somewhere but how? *** Bug 356054 has been marked as a duplicate of this bug. *** As I wrote in bug225764 the underlying bug in firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=333198) is solved ( fixed1.9.1 ). Shouldn't it be able to fix this bug now? Or is there still another problem? Thanks for any insight. I didn't reproduce this bug again because I moved to GWT because of some limitation of RAP. I am looking forward to use RAP again in my next project :-) I rather prefer to keep this bug opened as the issue is still valid in RAP. Reopened. I tried out, what would happen if I removed the untrustedKey-Check from the AsyncKeyEventUtil.js. The ArrowKeys do work in Firefox 9. So does also the ctrl-v/c in plain text fields. Did it break something else? I do not know. What would I have to test? Do some tests exists, which would/could fail without the untrustedKey-Check? Please some insights. Else I would like it very much, if this code coud be removed. Synchronous key events with FF 2+ seem to work fine, so this might be a way to support it. The untrusted keys are still untrusted however, at least in FF8. To check this, uncomment the left/right keys in ASyncKeyEventUtil, add a key-listener to a text field and try to navigate with left/right. It wont work. You are right. Left/right/up/down won't work anymore in the browser if it is in the active-keys from the active text field. But this won't be a problem if it is clearly stated in javadoc or RWT.ACTIVE_KEY (or better in the missing static-fields RWT.ARROW_LEFT etc.). We have many singleline text fields which listen to to up/down keys to open a new box or change the value. And now they don't work in firefox. I vote for removing the untrusted key list. We are in the process of refactoring the key events completely, and this should no longer be and issue when we are done. Well that would be a huge relieve. I'm looking forward to it. After fixing Bug 367871 this issue is finally fixed. Note that now it's no longer possible to prevent moving the carret with the arrow keys using the doit flag. Use the RWT.CANCEL_KEYS feature instead. That's GREAT! Thank you very much. It works. |
Build Identifier: M20100909-0800 There are no key events fired for SWT.ARROR_DOWN and SWT.ARROW_UP on the RWT text widget. Reproducible: Always Steps to Reproduce: text.addKeyListener(new KeyListener() { @Override public void keyReleased(KeyEvent e) { System.out.println("Key released"); } @Override public void keyPressed(KeyEvent e) { System.out.println("Key pressed"); } });