Last active
August 29, 2015 14:04
-
-
Save bastimeyer/5cdc1973c0d3a39aad98 to your computer and use it in GitHub Desktop.
Node-Webkit v0.10.0 bug / -webkit-app-region: drag
This file contains 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
notice the mouseout event: this will only fire when the cursor is leaving the drag region |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>foo</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div style="padding: 5em; background: rgba(0,0,0,.25); -webkit-app-region: drag"> | |
<button type="button" class="btn btn-primary" style="-webkit-app-region: no-drag" onclick="window.close()">close window</button> | |
</div> | |
<script> | |
document.querySelector( "button" ).addEventListener( "mouseover", function() { console.log( "mouseover" ); }, false ); | |
document.querySelector( "button" ).addEventListener( "mouseout", function() { console.log( "mouseout" ); }, false ); | |
</script> | |
</body> | |
</html> |
This file contains 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
{ | |
"name": "foo", | |
"version": "0.0.1", | |
"main": "index.html", | |
"window": { | |
"title": "foo", | |
"frame": false, | |
"resizable": true, | |
"toolbar": false, | |
"show": true, | |
"position": "center", | |
"width": 960, | |
"height": 540 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment