[Libreoffice-commits] online.git: loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 30 21:02:04 UTC 2020
loleaflet/src/control/Control.ColumnHeader.js | 2 --
loleaflet/src/control/Control.RowHeader.js | 1 -
loleaflet/src/layer/AnnotationManager.js | 2 --
loleaflet/src/layer/marker/DivIcon.js | 1 -
4 files changed, 6 deletions(-)
New commits:
commit 40e92f10dd619e074240ac754330af5a9c8f7cbf
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Jan 30 13:55:46 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Thu Jan 30 22:01:44 2020 +0100
loleaflet: simplify 'contextmenu' prevent default
The document object has already prevented default actions
Change-Id: I4d60ec0c6915ca266f3e2c24f0958127186ca970
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87752
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index d21451373..76a59d593 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -60,7 +60,6 @@ L.Control.ColumnHeader = L.Control.Header.extend({
this._startOffset = 0;
this._position = 0;
- L.DomEvent.on(this._cornerCanvas, 'contextmenu', L.DomEvent.preventDefault);
L.DomEvent.addListener(this._cornerCanvas, 'click', this._onCornerHeaderClick, this);
this._menuItem = {
@@ -429,7 +428,6 @@ L.Control.ColumnHeader = L.Control.Header.extend({
this.mouseInit(canvas);
- L.DomEvent.on(canvas, 'contextmenu', L.DomEvent.preventDefault);
if ($('.spreadsheet-header-columns').length > 0) {
$('.spreadsheet-header-columns').contextMenu(this._map._permission === 'edit');
}
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index 1eb3abe13..98e5c8f45 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -418,7 +418,6 @@ L.Control.RowHeader = L.Control.Header.extend({
this.mouseInit(canvas);
- L.DomEvent.on(canvas, 'contextmenu', L.DomEvent.preventDefault);
if ($('.spreadsheet-header-rows').length > 0) {
$('.spreadsheet-header-rows').contextMenu(this._map._permission === 'edit');
}
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index 35bb428b2..866cc700c 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -77,7 +77,6 @@ L.AnnotationManager = L.Class.extend({
opacity: 0.25
});
comment.textSelected.addEventParent(this._map);
- L.DomEvent.on(comment.textSelected, 'contextmenu', L.DomEvent.preventDefault);
comment.textSelected.on('click', function() {
this.selectById(comment.id);
}, this);
@@ -106,7 +105,6 @@ L.AnnotationManager = L.Class.extend({
opacity: 0
});
redline.textSelected.addEventParent(this._map);
- L.DomEvent.on(redline.textSelected, 'contextmenu', L.DomEvent.preventDefault);
redline.textSelected.on('click', function() {
this.selectById(redline.id);
}, this);
diff --git a/loleaflet/src/layer/marker/DivIcon.js b/loleaflet/src/layer/marker/DivIcon.js
index 90dc8ea3f..7f8599f45 100644
--- a/loleaflet/src/layer/marker/DivIcon.js
+++ b/loleaflet/src/layer/marker/DivIcon.js
@@ -21,7 +21,6 @@ L.DivIcon = L.Icon.extend({
var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),
options = this.options;
- L.DomEvent.on(div, 'contextmenu', L.DomEvent.preventDefault);
div.innerHTML = options.html !== false ? options.html : '';
if (options.bgPos) {
More information about the Libreoffice-commits
mailing list