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

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 16 13:51:59 UTC 2020


 loleaflet/src/control/Control.TopToolbar.js |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 58a9142907a6387389f52168ca24233087dd7f9e
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Sep 16 16:04:31 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Sep 16 15:51:39 2020 +0200

    Make the 'modifypage' button work on first tap in iOS app
    
    Horrible hack: Could not figure out the root cause, so just pretend
    the user tapped twice then the first time.
    
    This is not intended to fix tdf#136457 though. But it might still have
    some effect on that whole can of worms. That bug is hard to reproduce
    or even descibe exactly, so it is hard to say.
    
    Change-Id: I147a448cceb0adc25fa5d136d59bfebf91839aaf
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102872
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/loleaflet/src/control/Control.TopToolbar.js b/loleaflet/src/control/Control.TopToolbar.js
index 51322b5f8..af271b21f 100644
--- a/loleaflet/src/control/Control.TopToolbar.js
+++ b/loleaflet/src/control/Control.TopToolbar.js
@@ -1,4 +1,4 @@
-/* -*- js-indent-level: 8 -*- */
+/* -*- js-indent-level: 8; fill-column: 100 -*- */
 /*
  * L.Control.TopToolbar
  */
@@ -237,6 +237,16 @@ L.Control.TopToolbar = L.Control.extend({
 			name: 'editbar',
 			items: this.getToolItems(),
 			onClick: function (e) {
+				if (window.ThisIsTheiOSApp && e.target === 'modifypage' && window.ModifyPageTapped === undefined) {
+					// Horrible hack. I can't figure out why it needs two taps
+					// to display initially, so call this an extra time for the
+					// first tap. And for some reason I need to do it after a
+					// short timeout.
+					setTimeout(function() {
+						window.onClick(e, e.target);
+					}, 100);
+					window.ModifyPageTapped = true;
+				}
 				window.onClick(e, e.target);
 				window.hideTooltip(this, e.target);
 			},


More information about the Libreoffice-commits mailing list