[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Tue May 23 00:37:07 UTC 2017
loleaflet/src/control/Control.ColumnHeader.js | 1 +
loleaflet/src/control/Control.RowHeader.js | 1 +
2 files changed, 2 insertions(+)
New commits:
commit 0ebedb7efac0ea311c0683cb918ce90ba31d096f
Author: Henry Castro <hcastro at collabora.com>
Date: Mon May 22 20:36:31 2017 -0400
loleaflet: prevent default context menu of the row/column resize area
Change-Id: I184a698fd63a0b3e83efb8c315ccca730d56112a
diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index d700742c..b79678fc 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -171,6 +171,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
column = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns);
text = L.DomUtil.create('div', 'spreadsheet-header-column-text', column);
resize = L.DomUtil.create('div', 'spreadsheet-header-column-resize', column);
+ L.DomEvent.on(resize, 'contextmenu', L.DomEvent.preventDefault);
column.size = columns[iterator].size;
var content = columns[iterator].text;
text.setAttribute('rel', 'spreadsheet-column-' + content); // for easy addressing
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index d5f702a1..c582117e 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -162,6 +162,7 @@ L.Control.RowHeader = L.Control.Header.extend({
row = L.DomUtil.create('div', 'spreadsheet-header-row', this._rows);
text = L.DomUtil.create('div', 'spreadsheet-header-row-text', row);
resize = L.DomUtil.create('div', 'spreadsheet-header-row-resize', row);
+ L.DomEvent.on(resize, 'contextmenu', L.DomEvent.preventDefault);
row.size = rows[iterator].size;
var content = rows[iterator].text;
text.setAttribute('rel', 'spreadsheet-row-' + content); // for easy addressing
More information about the Libreoffice-commits
mailing list