Skip to content

win10 drag-dot no hover style #6

Open

Description

@alexanderniebuhr

since setting frameless for win10 is require, all elements with -webkit-app-region:drag;, will not receive any mouse events. :hover styles do not work.

have to find a solution sometime. just add this as tracking and reminder.. Also dragging works, just no hover background only win10

Activity

  1. antfu commented on May 3, 2021

    @antfu
    Owner

    What if we wrap the drag area with a normal dom and let it handle the hover?

  2. alexanderniebuhr commented on May 4, 2021

    @alexanderniebuhr
    ContributorAuthor

    maybe that would work.. not quire sure how to wrap it, the dragable area needs to stay the same size also the hover effect.. but if they are on top of each other, it would not work..

  3. antfu commented on May 4, 2021

    @antfu
    Owner

    Let's say:

    <div class="wrapper w-10 h-10 rounded-full hover:bg-gray-400">
      <div class="draggable w-10 h-10"/>
    </div>

    Would that work?

  4. alexanderniebuhr commented on May 4, 2021

    @alexanderniebuhr
    ContributorAuthor

    no that would not work.
    The div with class draggable is same size, so the div with class wrapper does not get the hover event
    I know that you can wrap it in electron with js eventlistener onMouseDown or something

    my understanding: for elements with -webkit-app-region:drag; there is no order or hirachy, it doesn't matter if it is behind or on top of another element. That area is always blocked to the drag.. The issue is with windows 10 needing frame: false

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions