commit 15928b9db9939506612ee9bad291530c4aff4ce3
parent a306f6fe960d90e42b625e1ef4b8f877591869c0
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Tue, 14 Mar 2017 00:24:38 +0300
[caption] enable standard context menu on right click -- allow copy links to clipboard
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/lib/leaflet.control.caption/index.js b/src/lib/leaflet.control.caption/index.js
@@ -17,6 +17,11 @@ L.Control.Caption = L.Control.extend({
this._container = L.DomUtil.create('div', this.options.className);
this._stopContainerEvents();
this._container.innerHTML = this._contents;
+ L.DomEvent.on(this._container, 'contextmenu', (e) => {
+ L.DomEvent.stopPropagation(e);
+ e.returnValue = true;
+ return true;
+ });
return this._container;
}