Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356054

Summary: [Widget]SWT.KeyUp Listener does not work on Firefox
Product: [RT] RAP Reporter: Stephan Leicht Vogt <stephan.leichtvogt>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Sample Project to reproduce bug none

Description Stephan Leicht Vogt CLA 2011-08-29 04:52:53 EDT
A registered SWT.KeyUp Listener does not work in Firefox. In Chrome and IE9 it works just fine.

Reproduce this bug with attached Sample Project.
Comment 1 Stephan Leicht Vogt CLA 2011-08-29 04:53:31 EDT
Created attachment 202304 [details]
Sample Project to reproduce bug
Comment 2 Ivan Furnadjiev CLA 2011-08-29 05:11:54 EDT
There is a set of keys called "untrusted keys" that does not work in Firefox and currently is not possible to make them work:
...
        37,  // Left
        38,  // Up
        39,  // Right
        40,  // Down
        35,  // End
        36,  // Home
        45,  // Insert
        46,  // Delete
        112, // F1
        113, // F2
        114, // F...
        115,
        116,
        117,
        118,
        119,
        120,
        121,
        122,
        123  // F12
...
All other keys should work in FF. I will mark this bug as a duplicate of bug 329639. Please reopen if you disagree.

*** This bug has been marked as a duplicate of bug 329639 ***
Comment 3 Stephan Leicht Vogt CLA 2011-08-29 05:23:02 EDT
But in the RAP Examples the Spinner Widget does work in FF. KeyUp / KeyDown does increase / decrease the spinner value. Is this something different? Does FF prevent the events to be sent to the server?
Comment 4 Ivan Furnadjiev CLA 2011-08-29 05:33:21 EDT
Because of the possibility to cancel the key event on the server ( set keyEvent.doit to false ), we always cancel the DOM on the client and than re-throw it if it's allowed from the server. In FF, if I remember correctly, it's not possible to programmatically throw an untrusted DOM key event. This is a specifics to the server-side key events listeners only. Rolling of the Spinner is done completely on the client (no server-side key listeners involved).
Comment 5 Stephan Leicht Vogt CLA 2011-08-29 10:36:45 EDT
Allright, thanks for the answer. I hope this can and will be solved in the future. We have many use cases where we register KeyUp and KeyDown.