Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hover in CSS is not working with Electron

I'm starting to make my simple code editor. The window that I create with Electron is without frame (frame: false). Because of that, I created a div with class .drag, which has -webkit-app-region set to drag.

.drag {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #F0D6BA;
    -webkit-user-region: drag;
}

.drag:hover {
    height: 25px;
    background-color: #7EA5A3;
}

It works perfectly in the browser, but if I use it in Electron, nothing changes when I hover my mouse over element.

like image 962
somerandomdev49 Avatar asked Sep 20 '25 21:09

somerandomdev49


1 Answers

I understand why this happens now: Any elements with -webkit-app-region: drag do not receive mouse events. Thanks 41 72 6c!

like image 50
somerandomdev49 Avatar answered Sep 23 '25 11:09

somerandomdev49