diff --git a/src/main/webapp/static/js/jquery/openolat/jquery.paint.js b/src/main/webapp/static/js/jquery/openolat/jquery.paint.js index a096170dd7bbf5e5cae00da4af86b833bf2b3acd..64fd39139ff3084f1cc5ac3a49239a031875d971 100644 --- a/src/main/webapp/static/js/jquery/openolat/jquery.paint.js +++ b/src/main/webapp/static/js/jquery/openolat/jquery.paint.js @@ -141,7 +141,7 @@ undo_arr.push(empty_canv); //NEWTHING jQuery(tmp_canvas).on('mousedown touchstart', function(e) { - if(isDoubleTouch(e)) { + if(isDoubleTouch(e) || isRightClick(e)) { return; } @@ -476,10 +476,24 @@ } return false; } + + function isRightClick(e) { + try { + console.log(e); + if(!(typeof e == "undefined") + && !(typeof e.which == "undefined") + && (e.which == 2 || e.which == 3)) { + return true; + } + } catch(ex) { + if(window.console) console.log(ex); + } + return false; + } function onPaint(e) { if(!(typeof e == "undefined")) { - if(isDoubleTouch(e)) { + if(isDoubleTouch(e) || isRightClick(e)) { return; } e.preventDefault();