New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Chromium, mouse move events only arrive when mouse button is down #490

Closed
andybalaam opened this Issue Jan 22, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@andybalaam

andybalaam commented Jan 22, 2016

I'm not sure whether this is a Chromium bug, or something that can be fixed or worked around in the Elm runtime.

When I launch an Elm program in Chromium I do not see mouse movement events.

In Firefox, I see mouse events whenever I move the mouse (as I would expect).

$ chromium-browser --version
Chromium 47.0.2526.106 Ubuntu 15.04
$ cat Main.elm 
import Mouse
import Graphics.Element exposing ( show )


main = Signal.map show Mouse.position
$ elm-reactor &
elm reactor 0.16.0
Listening on http://0.0.0.0:8000/
$ chromium-browser http://0.0.0.0:8000/Main.elm

When I run the above, the mouse co-ordinates display does not update when I move the mouse over the Chromium window. When I click and drag, or move out of the window and back in, the co-ordinates do update.

If I do the same in Firefox I see the co-ordinates changing whenever I move the mouse (as I would expect).

@andybalaam

This comment has been minimized.

Show comment
Hide comment
@andybalaam

andybalaam Jan 22, 2016

I added a breakpoint in Chromium in this code in Main.elm (for me, line 5465):

    localRuntime.addListener([position.id], node, 'mousemove', function move(e) {
        localRuntime.notify(position.id, Utils.getXY(e));
    });

I don't hit the breakpoint when I move the mouse, but I do when I click and drag.

andybalaam commented Jan 22, 2016

I added a breakpoint in Chromium in this code in Main.elm (for me, line 5465):

    localRuntime.addListener([position.id], node, 'mousemove', function move(e) {
        localRuntime.notify(position.id, Utils.getXY(e));
    });

I don't hit the breakpoint when I move the mouse, but I do when I click and drag.

@andybalaam

This comment has been minimized.

Show comment
Hide comment
@andybalaam

andybalaam Jan 22, 2016

$ elm-make -h
elm-make 0.16 (Elm Platform 0.16.0)

andybalaam commented Jan 22, 2016

$ elm-make -h
elm-make 0.16 (Elm Platform 0.16.0)
@andybalaam

This comment has been minimized.

Show comment
Hide comment
@andybalaam

andybalaam Feb 1, 2016

I tried this with a different version of Chromium and it worked fine so I think this is some weird Chromium-specific corner case. Closing.

andybalaam commented Feb 1, 2016

I tried this with a different version of Chromium and it worked fine so I think this is some weird Chromium-specific corner case. Closing.

@andybalaam andybalaam closed this Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment