[Libreoffice-commits] online.git: 2 commits - loleaflet/src

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


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

New commits:
commit 4247dad6f54c7084710937d7efd460fac265ccd2
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:29:01 2019 +0300

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

diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 43cb889c9..287a1598d 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.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 981db95a28b6001e1fc7e236155f13eec46d346e
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:27:30 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