[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Thu Jan 18 06:59:30 UTC 2018


 loleaflet/src/control/Control.LokDialog.js |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 63e089ec22150524d040f544538f8455e62a1887
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Jan 18 12:27:52 2018 +0530

    loleaflet: No native contextmenu options on dialog canvas
    
    Dialogs can have their own context menu invoked upon right click. And
    they already works (i.e. are tunneled properly); so, let's use them.
    
    Change-Id: I7d504923c272227dca94058995456d89e1079c29

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 6dd22772..0b3c48ec 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -192,6 +192,8 @@ L.Control.LokDialog = L.Control.extend({
 		dialogCanvas.contentEditable = true;
 		dialogCanvas.id = strDlgId + '-canvas';
 
+		L.DomEvent.on(dialogCanvas, 'contextmenu', L.DomEvent.preventDefault);
+
 		var that = this;
 		$(dialogContainer).dialog({
 			width: width,


More information about the Libreoffice-commits mailing list