-
-
Save 1312069653/007a5232b751f767fcc8aa87967caefc to your computer and use it in GitHub Desktop.
Disable dragging and selecting html elements (like links, images etc...) in Electron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MAKE ELECTRON APP FEEL MORE NATIVE | |
* | |
* * Prevent dragging all HTML elements, specially: | |
* - images | |
* - links (anchors) | |
* | |
* * Prevent text selection | |
*/ | |
*, *::after, *::before { | |
-webkit-user-select: none; | |
-webkit-user-drag: none; | |
-webkit-app-region: no-drag; | |
cursor: default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment