[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 29 12:36:00 UTC 2018


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

New commits:
commit addf7210a741e726a1ac3621e56e3067247dd852
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Nov 29 13:47:55 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Nov 29 13:35:48 2018 +0100

    Do pass Alt + non-printing keys through with the Alt modifier intact
    
    Such commands are used for formatting functionality. (For instance,
    Alt+Left or Alt+Right to shrink or grow a column in a spreadsheet, or
    Alt+Enter to insert a paragraph just before a table in a text
    document.)
    
    All the uses of Alt in the meaning "alternate character input" on an
    Apple keyboard are with keys for printing characters, like Alt+2 = @
    on a Swedish/Finnish keyboard.
    
    Change-Id: I6cfde57f540ac92c63420c8d7344102645050dd0
    Reviewed-on: https://gerrit.libreoffice.org/64248
    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 4e489b075..336c6b0b0 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -301,8 +301,10 @@ L.Map.Keyboard = L.Handler.extend({
 			inputEle.value = '';
 		}
 
-		if (this.modifier == this.keyModifier.alt || this.modifier == this.keyModifier.shift + this.keyModifier.alt) {
+		if ((this.modifier == this.keyModifier.alt || this.modifier == this.keyModifier.shift + this.keyModifier.alt) &&
+		    keyCode >= 48) {
 			// Presumably a Mac or iOS client accessing a "special character". Just ignore the alt modifier.
+			// But don't ignore it for Alt + non-printing keys.
 			this.modifier -= alt;
 			alt = 0;
 		}


More information about the Libreoffice-commits mailing list