Lindsay
Lindsay

Reputation: 917

How to make Browser Window draggable?

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?

Upvotes: 6

Views: 6738

Answers (1)

Max
Max

Reputation: 4636

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;
}

Upvotes: 13

Related Questions