[Libreoffice-commits] online.git: loleaflet/src
farukuzun
farukuzun at collabora.com
Mon Jan 4 12:26:25 PST 2016
loleaflet/src/map/handler/Map.Keyboard.js | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8dd56fafe7d9fe0db15f09ad0c49357178c2aaba
Author: farukuzun <farukuzun at collabora.com>
Date: Mon Jan 4 21:57:22 2016 +0200
loleaflet: Fix Ctrl+Alt+C (insert comment) on Firefox
On Firefox, pressing Ctrl+Alt+c (uppercase "C" is working fine)
to insert a comment causes a "c" letter in comment box,
because KeyboardEvent.char[0] deprecated. It is working
quite well in other browsers. A workaround is needed for Firefox.
[0]: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/char
Change-Id: Iaf89c8b3b758e99189dd982e2d36aef559a32f1a
Reviewed-on: https://gerrit.libreoffice.org/21086
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/map/handler/Map.Keyboard.js b/loleaflet/src/map/handler/Map.Keyboard.js
index 6df4b4c..6ef3c23 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -340,6 +340,12 @@ L.Map.Keyboard = L.Handler.extend({
if (e.originalEvent.altKey || e.originalEvent.shiftKey) {
+ // need to handle Ctrl + Alt + C separately for Firefox
+ if (e.originalEvent.key === 'c' && e.originalEvent.altKey) {
+ L.Socket.sendMessage('uno .uno:InsertAnnotation');
+ return true;
+ }
+
// Ctrl + Alt
if (!e.originalEvent.shiftKey) {
switch (e.originalEvent.keyCode) {
More information about the Libreoffice-commits
mailing list