[Libreoffice-commits] online.git: Branch 'libreoffice-6-2' - 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 4a46396702cb249cdbfeef63c051eaf615f59321
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:43 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/64247
    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 607e3283e..77adf34b7 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -302,8 +302,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