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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Apr 25 14:16:06 UTC 2019


 loleaflet/js/toolbar.js             |    3 ++-
 loleaflet/src/control/Permission.js |    5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit a3e2d55736b0157c35e5e842daca73e401d754db
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Apr 25 14:16:54 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 25 17:12:40 2019 +0300

    tdf#124950: Don't pop up keyboard on iOS when clicking in toolbar

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 71327fa7c..959e6e8c1 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -115,7 +115,8 @@ function onClick(e, id, item, subItem) {
 		throw new Error('unknown id: ' + id);
 	}
 	var docLayer = map._docLayer;
-	if (id !== 'zoomin' && id !== 'zoomout') {
+	// In the iOS app we don't want clicking on the toolbar to pop up the keyboard.
+	if (!window.ThisIsTheiOSApp && id !== 'zoomin' && id !== 'zoomout') {
 		map.focus();
 	}
 	if (item.disabled) {
commit 45656129c2e04408d86340c4ad82c681a2425b74
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Apr 25 13:47:11 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 25 17:12:40 2019 +0300

    tdf#124950: Don't pop up keyboard on iOS when clicking the mobile-edit-button
    
    Only when the user taps in the document, or selects some text in it,
    is it obvious that they want to be able to type into it.
    
    This is just one of the instances where the on-screen keyboard popped
    up for no good reason.

diff --git a/loleaflet/src/control/Permission.js b/loleaflet/src/control/Permission.js
index 37ad81a05..de4fc7e63 100644
--- a/loleaflet/src/control/Permission.js
+++ b/loleaflet/src/control/Permission.js
@@ -16,7 +16,10 @@ L.Map.include({
 					button.hide();
 					that._enterEditMode('edit');
 					that.fire('editorgotfocus');
-					that.focus();
+					// In the iOS app, just clicking the mobile-edit-button is
+					// not reason enough to pop up the on-screen keyboard.
+					if (!window.ThisIsTheiOSApp)
+						that.focus();
 				});
 
 				// temporarily, before the user touches the floating action button


More information about the Libreoffice-commits mailing list