mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix contextmenu right click (active only above drawing canvas)
This commit is contained in:
parent
0bb097e54b
commit
92561db1c6
@ -71,7 +71,7 @@
|
|||||||
body.mouseup($.proxy(this.onMouseup_, this));
|
body.mouseup($.proxy(this.onMouseup_, this));
|
||||||
|
|
||||||
// Deactivate right click:
|
// Deactivate right click:
|
||||||
//body.contextmenu(this.onCanvasContextMenu_);
|
body.contextmenu(this.onCanvasContextMenu_);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -217,10 +217,13 @@
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ns.DrawingController.prototype.onCanvasContextMenu_ = function (event) {
|
ns.DrawingController.prototype.onCanvasContextMenu_ = function (event) {
|
||||||
|
if ($(event.target).closest('#drawing-canvas-container').length) {
|
||||||
|
// Deactivate right click on drawing canvas only.
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.cancelBubble = true;
|
event.cancelBubble = true;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.DrawingController.prototype.render = function () {
|
ns.DrawingController.prototype.render = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user