From 579c836bc947749c2b8e7112ca552fad7173f63d Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Wed, 10 Jul 2013 19:47:13 +0000 Subject: [PATCH] Fixed annoying selection of the main canvas / the body / html. --- index.html | 7 +++++++ main.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 619669e..38a0a43 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,13 @@ image-rendering: -webkit-optimize-contrast; image-rendering: -o-crisp-edges; image-rendering: optimize-contrast; + cursor: default; + } + canvas,body,html,#gui-overlay{ + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .tool:hover,.color:hover{ box-shadow: 0 0 2px 1px rgba(0,0,0,0.4) inset, 0 0 1px 3px rgba(255,255,255,0.4) inset; diff --git a/main.js b/main.js index f860f71..09cffef 100644 --- a/main.js +++ b/main.js @@ -2,7 +2,7 @@ var canvas = document.querySelector("canvas"); var mainctx = canvas.getContext("2d"); addEventListener('contextmenu',function(e){return!!e.preventDefault()}); - addEventListener('mousedown',function(e){return!!e.preventDefault()}); + //addEventListener('mousedown',function(e){return!!e.preventDefault()}); var editing = true; var gui = new GUI();