From e60c9a1e8c708eb910a1f29235fb59abf99eccb2 Mon Sep 17 00:00:00 2001 From: "Kellner, Niklas" Date: Mon, 29 Apr 2024 08:42:22 +0200 Subject: [PATCH] Fixes eclipse-glsp/glsp#874 Without this fix there are duplicated Key Binding Triggers on WebKit as the fix provided by BrowserKeyBindingForwarderInstaller is only an Issue on Chrome and Edge --- .../org/eclipse/glsp/ide/editor/ui/GLSPDiagramComposite.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/plugins/org.eclipse.glsp.ide.editor/src/org/eclipse/glsp/ide/editor/ui/GLSPDiagramComposite.java b/server/plugins/org.eclipse.glsp.ide.editor/src/org/eclipse/glsp/ide/editor/ui/GLSPDiagramComposite.java index 86f2765..f35ef56 100644 --- a/server/plugins/org.eclipse.glsp.ide.editor/src/org/eclipse/glsp/ide/editor/ui/GLSPDiagramComposite.java +++ b/server/plugins/org.eclipse.glsp.ide.editor/src/org/eclipse/glsp/ide/editor/ui/GLSPDiagramComposite.java @@ -36,6 +36,7 @@ import org.apache.logging.log4j.Logger; import org.eclipse.core.commands.common.EventManager; import org.eclipse.core.resources.IMarker; +import org.eclipse.core.runtime.Platform; import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.glsp.graph.GModelElement; import org.eclipse.glsp.ide.editor.GLSPServerManager; @@ -332,7 +333,9 @@ protected void mouseEnteredBrowser(final MouseEvent event) { protected void installBrowserFunctions() { // browser functions are automatically disposed with the browser - new BrowserKeyBindingForwarderInstaller(context.get(IBindingService.class)).install(browser); + if (Platform.getOS().equals(Platform.WS_WIN32)) { + new BrowserKeyBindingForwarderInstaller(context.get(IBindingService.class)).install(browser); + } new BrowserFocusControlInstaller().install(browser); new BrowserContextMenuInstaller().install(browser); }