Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Browser Window draggable?

Tags:

electron

I have a Browser Window (using Electron.atom.io) and I'm trying to make it so that you can click over most of the screen (except inputs, etc) and drag it over your desktop - basically, I don't want to restrict drag just to the title bar.

Does anyone know how I might be able to do this?

like image 230
Lindsay Avatar asked Mar 26 '16 17:03

Lindsay


1 Answers

Electron supports a webkit property intended for frameless windows, that I believe should work for you. The documentation is here. Basically just make a class and add it to any elements you want draggable:

.draggable {
    -webkit-app-region: drag;
}
like image 176
Teak Avatar answered Nov 03 '22 20:11

Teak