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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 8 10:08:27 UTC 2019


 loleaflet/src/control/Control.MobileInput.js |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit e095d28146acc3f27d739b7143a9cdb5e4f3b479
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 8 11:30:12 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Nov 8 11:08:05 2019 +0100

    tdf#128506: Call preventDefault() for the Tab key (from a hardware keyboard)
    
    Otherwise the focus of keyboard input will move to some weird location.
    
    Do it only in the iOS app case for fear of breaking something on other
    platforms.
    
    Change-Id: Idd78863fcb4afafbe4e1a648e907631d17ffc34c
    Reviewed-on: https://gerrit.libreoffice.org/82274
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/loleaflet/src/control/Control.MobileInput.js b/loleaflet/src/control/Control.MobileInput.js
index 07ab7b520..b9db83cbb 100644
--- a/loleaflet/src/control/Control.MobileInput.js
+++ b/loleaflet/src/control/Control.MobileInput.js
@@ -268,6 +268,10 @@ L.Control.MobileInput = L.Control.extend({
 			this._keyHandled = true;
 			// console.log('    _keyHandled := true');
 		}
+		if (window.ThisIsTheiOSApp && e.key === 'Tab') {
+			// We don't want Tab to move focus
+			L.DomEvent.preventDefault(e);
+		}
 		L.DomEvent.stopPropagation(e);
 	},
 


More information about the Libreoffice-commits mailing list