Skip to content

mouseleave event isn't fired when moving the mouse outside the window (Windows) #611

@MartinMa

Description

@MartinMa

I have a simple div with a css hover effect changing the background color. When I move the mouse outside of the window area, the div keeps its hover style. It should actually go back to its normal style. Presumable the mouseleave event was "swallowed".

For a demonstration video see here: https://www.screenr.com/4M0N

It happens using the frameless view and using the windows frame view. Even though the latter is more difficult to reproduce (move the mouse faster).

You can reproduce it with this sample code:

<!DOCTYPE html>
<html>
  <head>
    <title>mouseleave</title>

        <style>
            .box {
                position: absolute;
                top: 0;
                right: 0;
                bottom: 0;
                left: 10%;
            }
            .box:hover {
                background-color: red;
            }
        </style>
  </head>
  <body>
        <div class="box"></div>
  </body>
</html>

My setup:
Windows 8.1 7
atom-shell 0.15.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions