[Libreoffice-commits] online.git: loleaflet/src
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 20 15:12:07 UTC 2019
loleaflet/src/control/Control.LokDialog.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 27ad4cd17bce93dee059ed4accf5b60c8f1516c1
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Jul 4 15:10:22 2019 +0200
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Tue Aug 20 17:11:49 2019 +0200
Fix TypeError.
No idea why window.mode.isMobile() did not work here - it does for me.
The previous code was causing a TypeError exception on the desktop.
Change-Id: I0108e2e4ac5d3ba487ac94b6459ea3f78032c606
Reviewed-on: https://gerrit.libreoffice.org/77839
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 00c957de5..cb4a68e5b 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -543,8 +543,9 @@ L.Control.LokDialog = L.Control.extend({
offsetY = -(height - window.screen.height) / 2;
}
- // FIXME. window.mode.isMobile() return false
- if (L.Browser.mobile() && screen.width < 768 && height < window.screen.height) {
+ // on mobile, force the positioning to the top, so that it is not
+ // covered by the virtual keyboard
+ if (window.mode.isMobile()) {
$(dialogContainer).dialog('option', 'position', { my: 'left top', at: 'let top', of: window });
offsetY = 0;
}
More information about the Libreoffice-commits
mailing list