Skip to content

Edge: addMouseWheelListener and addMouseListener have no effect #2164

Open
@rubenporras

Description

@rubenporras

Describe the bug
When using an Edge browser, if the methods addMouseWheelListener or addMouseListener are used, the listener is registered but never executed.

To Reproduce

    Browser browser = new Browser(browserContainer, SWT.NONE);

    browser.addMouseWheelListener(e -> {
      System.out.println(e.toString());
    });
    browser.addMouseListener(new MouseListener() {

      @Override
      public void mouseUp(final MouseEvent e) {
        System.out.println(e.toString());
      }

      @Override
      public void mouseDown(final MouseEvent e) {
        System.out.println(e.toString());
      }

      @Override
      public void mouseDoubleClick(final MouseEvent e) {
        System.out.println(e.toString());
      }
    });

Expected behavior
The listeners are called when the scroll wheel is used or the buttons of the mouse is are clicked inside the Edge window

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [] All OS
    • Windows
    • Linux
    • macOS

Workaround (or) Additional context

Use the SWT.IE when creating the browser.
Use a javascript function to react to the scroll wheel / buttons and register a normal BrowserFunction as a callback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    edgeEdge Browser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions