| Summary: | [KeyEvents] The state of the modifier key is not updated for cancelled keys. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Jacek Wozniak <jacek.wozniak> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | tbuschto | ||||
| Version: | 2.0 | ||||||
| Target Milestone: | 2.1 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I can reproduce it with the attached snippet (but not always). Change priority to P2 as it is a regression. Fixed with commit bc7b3b12cba3713821cb7c9cc9fb603276d993ed The modifier values used were the ones cached in EventUtil.js, which are meant more for mouse events. Wrong commit id. Here is the correct one: 332e1385b5ff2160cf3883ff72ae52295a4e7614. |
Created attachment 226573 [details] A snippet to reproduce the issue. If I press a key with a modifier (e.g. Shift+F3) and then the same key without the modifier (F3), the key event's stateMask is not updated. It holds the previous value (Shift). This bug occurs for cancelled keys (RWT.CANCEL_KEYS). Pressing some other key or even clicking a mouse updates the state mask so the next key event has correct modifier value. I can reproduce it in RAP 2.0 RC2, RC1 using key/traverse listeners and display key filters, with modifiers: Alt/Shift/Ctrl. It works fine in RAP 1.5. To reproduce, run the attached snippet: 1. Press F3, event.stateMask = 0 - Ok. 2. Press Shift+F3, event.stateMask = 131072 - Ok. 3. Press F3, event.stateMask = 131072 - Not Ok. I tested with browsers: IE9, FF, Chrome.