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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 12:44:04 UTC 2018


 loleaflet/src/map/handler/Map.Keyboard.js |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 80e91e5e3935b46bb8a9c084b04a863ff90436e4
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Oct 24 18:37:17 2018 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Nov 28 13:43:45 2018 +0100

    tdf#120438: Don't handle a lone "alt" modifier in any special way
    
    It is likely a Mac browser client simply accessing a "special
    character" on their keyboard. (Or an iOS browser client using a
    physical keyboard.) Like alt+8 to get '[' on a Swedish/Finnish Apple
    keyboard, or alt+shift+2 to get '€' on a US English Apple keyboard.
    
    Change-Id: I94b49d64db87324ff2a5cd5f50226d3c537b68e6
    Reviewed-on: https://gerrit.libreoffice.org/62315
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit 1e97cfc2d2a8ee3e296ddfb7a331466bede4a575)
    Reviewed-on: https://gerrit.libreoffice.org/64166
    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 f5d3282da..4e489b075 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -301,6 +301,12 @@ L.Map.Keyboard = L.Handler.extend({
 			inputEle.value = '';
 		}
 
+		if (this.modifier == this.keyModifier.alt || this.modifier == this.keyModifier.shift + this.keyModifier.alt) {
+			// Presumably a Mac or iOS client accessing a "special character". Just ignore the alt modifier.
+			this.modifier -= alt;
+			alt = 0;
+		}
+
 		var unoKeyCode = this._toUNOKeyCode(keyCode);
 
 		if (this.modifier) {


More information about the Libreoffice-commits mailing list