eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
118 stars 139 forks source link

WebKit doubles Keystrokes #1200

Open N1k145 opened 7 months ago

N1k145 commented 7 months ago

Describe the bug When having the Focus in a WebKit Browser, keybindings are triggered twice.

I did a bit of Debugging and notices that there are coming two Events from the Display Que, but I was not able to determine how the second event ended up on the Que.

To Reproduce A standalone SWT snippet to reproduce the behavior (preferable):

import javax.annotation.PostConstruct;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;

public class BrowserPart {

   @PostConstruct
   public void build(final Composite parent) {
      Browser browser = new Browser(parent, SWT.NONE);
      browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));

      browser.setUrl("https://google.com");
   }
}

Steps to reproduce the behavior: Alternatively, open the "Internal Browser" View in Eclipse

Click Ctrl + H, the Search Dialog opens Click Esc or Cancle The Dialog closes The Dialog opens again

Expected behavior The Dialog opens once

Screenshots

https://github.com/eclipse-platform/eclipse.platform.swt/assets/15220836/a4ff296f-3bae-40e1-a393-e13020d35697

Environment:

  1. Select the platform(s) on which the behavior is seen:

      • [ ] All OS
      • [ ] Windows
      • [x] Linux
      • [ ] macOS
  2. Additional OS info (e.g. OS version, Linux Desktop, etc) Ubuntu 22.4 X11

  3. JRE/JDK version Java 17 Coretto

Version since At least 23-09 (4.29)

Workaround (or) Additional context Add any other context about the problem here. Any known workarounds for the problem?

No

jukzi commented 6 months ago

@N1k145 if you need a fix please provide a PR as there is currently nobody fixing such errors.

N1k145 commented 6 months ago

@jukzi thank you for the hint. But I have to say that I have no idea how to tackle this. As this probably involves the native SWT/GTK parts from what I have seen during my initial investigation.