Sunday, September 2, 2018

Re: GWT Mouse Events - Move event always follows a mouse up

I did some experiments with JS as Thomas suggested. Found Chrome & Opera firing a mouseMoved event in the end of the sequence: mouseDown, mouseMove, mouseUp.

Firefox and MS Edge on the hand behaved as expected - means, the last fired event was mouseUp.
Safari on Mac - is inconclusive. The touchpad works as expected, mouseUp was the last event fired. With a mouse it's mixed.

Below is the test code.

<!DOCTYPE html>

        function mouseDown() {
            document.getElementById("myDiv").style.background = "red";

        function mouseUp() {
            document.getElementById("myDiv").style.background = "green";

        function mouseMove() {
            document.getElementById("myDiv").style.background = "blue";

        function mouseOut() {
            document.getElementById("myDiv").style.background = "white";

        div {
            height: 200px;
            width: 50%;
            background-color: powderblue;
            font-family: Verdana;
            border: 2px solid black;


    <div id="myDiv" onmousedown="mouseDown()" onmouseup="mouseUp()" onmousemove="mouseMove()" onmouseout="mouseOut()" />


On Sunday, September 2, 2018 at 11:29:49 AM UTC-4, Velusamy Velu wrote:
I should have been more careful about what I claimed. Probably my claim that "causes GWT to register a mouse move" is wrong. I think you are right, those events are dispatched by the browser. I haven't tried JS yet.

On Sunday, September 2, 2018 at 4:44:22 AM UTC-4, Thomas Broyer wrote:
Could it just be the events your browser dispatches? Have you tried in pure JS?

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment