[Libreoffice-commits] online.git: loleaflet/src
Andras Timar
andras.timar at collabora.com
Sun Jan 24 08:43:18 PST 2016
loleaflet/src/map/handler/Map.Keyboard.js | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 7e50b73f5089acabaa473ebd3bd25cd094a17565
Author: Andras Timar <andras.timar at collabora.com>
Date: Sun Jan 24 17:42:19 2016 +0100
loleaflet: fix Cmd+C / Cmd+X / Cmd+V on OS X Firefox and Chrome
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index 956b118..a4fef65 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -233,11 +233,7 @@ L.Map.Keyboard = L.Handler.extend({
var cmd = e.originalEvent.metaKey ? this.keyModifier.ctrlMac : 0;
this.modifier = shift | ctrl | alt | cmd;
- if (cmd) {
- return;
- }
-
- if (ctrl) {
+ if (ctrl || cmd) {
if (this._handleCtrlCommand(e)) {
return;
}
@@ -398,7 +394,8 @@ L.Map.Keyboard = L.Handler.extend({
this._map._socket.sendMessage('uno .uno:SuperScript');
return true;
}
- if (e.type === 'keypress' && e.originalEvent.ctrlKey && (e.originalEvent.key === 'c' || e.originalEvent.key === 'v' || e.originalEvent.key === 'x')) {
+ if (e.type === 'keypress' && (e.originalEvent.ctrlKey || e.originalEvent.metaKey) &&
+ (e.originalEvent.key === 'c' || e.originalEvent.key === 'v' || e.originalEvent.key === 'x')) {
// need to handle this separately for Firefox
return true;
}
More information about the Libreoffice-commits
mailing list