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) {
|
||||||
event.preventDefault();
|
if ($(event.target).closest('#drawing-canvas-container').length) {
|
||||||
event.stopPropagation();
|
// Deactivate right click on drawing canvas only.
|
||||||
event.cancelBubble = true;
|
event.preventDefault();
|
||||||
return false;
|
event.stopPropagation();
|
||||||
|
event.cancelBubble = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.DrawingController.prototype.render = function () {
|
ns.DrawingController.prototype.render = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user