| Summary: | [Browser] Additional KeyDown event is sent on loaded websites | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | Grant Gayed <grant_gayed> |
| Severity: | normal | ||
| Priority: | P3 | CC: | nickel.de, Silenio_Quarti |
| Version: | 3.5 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Maybe related to bug 269733? *** Bug 328691 has been marked as a duplicate of this bug. *** This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
1. Run the code below. 2. Select the webpage on the left after eclipse.org is done loading. 3. Hit Ctrl+Shift+W, you will see two events, one from WebSite with a keyCode of 0, and another one from Browser with a keyCode of 119 (the character 'w'). This is causing problems for me where I have a browser in one of my editors, and I use Ctrl+Shift+W, then only the first editor goes away. At the UI level we seem to end up getting both Ctrl+W and Ctrl+Shift+W, so Ctrl+W is processed and the single active editor is closed when I expect all my editors to close. public static void main(String[] args) { Listener listener = new Listener() { public void handleEvent(Event e) { if (e.widget instanceof Shell) { return; } System.out.println(e.widget + "\t" + ((char) e.keyCode)); } }; Display d = new Display(); d.addFilter(SWT.KeyDown, listener); d.addFilter(SWT.Traverse, listener); Shell s = new Shell(d); s.setLayout(new FillLayout()); new Browser(s, SWT.NONE).setUrl("http://www.eclipse.org"); new Button(s, SWT.PUSH); s.open(); while (!s.isDisposed()) { if (!d.readAndDispatch()) { d.sleep(); } } d.dispose(); }