I've been searching all over the internet on how to make a frameless window draggable in electron and I keep finding the same solution everywhere, but it doesn't work for me.
This is my HTML code:
<header id="titlebar">
<div id="drag-region">
<img src="images/check_icon.svg" alt="icon" id="icon">
<p id="title">to do app</p>
</div>
</header>
And this is my CSS code:
#drag-region{
-webkit-user-select: none;
-webkit-app-region: drag;
}
I don't get any errors in the terminal however when I hover over -webkit-user-select: none;
, a message pops up saying Also define the standard property 'user-select' for compatibilitycss(vendorPrefix)
. I haven't messed with that since I have no clue what it means and it does its job.
I was just wondering if there is anything wrong with my html or css code and why the frameless window is not draggable. I'm also looking for any alternate ways if there are any.