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

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 27 06:42:49 PDT 2015


 loleaflet/src/map/handler/Map.Keyboard.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8dffdaf9493a98e8d36996bb882f12a88dc87a95
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 27 14:42:26 2015 +0100

    loleaflet: fix pasting in firefox, too

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index 4d037ed..f3b212b 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -247,7 +247,7 @@ L.Map.Keyboard = L.Handler.extend({
 	},
 
 	_handleCtrlCommand: function (e) {
-		if (e.type !== 'keydown' && e.originalEvent.key !== 'c') {
+		if (e.type !== 'keydown' && e.originalEvent.key !== 'c' && e.originalEvent.key !== 'v') {
 			e.originalEvent.preventDefault();
 			return;
 		};
@@ -302,7 +302,7 @@ L.Map.Keyboard = L.Handler.extend({
 				L.Socket.sendMessage('uno .uno:InsertSoftHyphen');
 				break;
 		}
-		if (e.originalEvent.keyCode !== 67 && e.originalEvent.keyCode !== 86 && e.originalEvent.key !== 'c') {
+		if (e.originalEvent.keyCode !== 67 && e.originalEvent.keyCode !== 86 && e.originalEvent.key !== 'c' && e.originalEvent.key !== 'v') {
 			// not copy or paste
 			e.originalEvent.preventDefault();
 		}


More information about the Libreoffice-commits mailing list