Skip to content
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

win10 drag-dot no hover style #6

Open
alexanderniebuhr opened this issue May 3, 2021 · 4 comments
Open

win10 drag-dot no hover style #6

alexanderniebuhr opened this issue May 3, 2021 · 4 comments

Comments

@alexanderniebuhr
Copy link
Contributor

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

@antfu
Copy link
Owner

antfu commented May 3, 2021

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

@alexanderniebuhr
Copy link
Contributor Author

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..

@antfu
Copy link
Owner

antfu commented May 4, 2021

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?

@alexanderniebuhr
Copy link
Contributor Author

alexanderniebuhr commented May 4, 2021

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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants