tdf#129374: Make the overlay wider on iOS if it seems necessary
Horrible hack, but works for the specific case described in the bug at
least.
Change-Id: I55150d84dc892ece69540fdc0d06bc277891c1fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86328
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
diff --git a/loleaflet/js/w2ui-1.5.rc1.js b/loleaflet/js/w2ui-1.5.rc1.js
index fb5572b..8d6562a 100644
--- a/loleaflet/js/w2ui-1.5.rc1.js
+++ b/loleaflet/js/w2ui-1.5.rc1.js
@@ -2388,6 +2388,13 @@
Y = (offset.top + w2utils.getSize(obj, 'height') + options.top + 7);
offsetTop = offset.top;
}
// tdf#129374 make the overlay wider so that it is more likely all we want to put in it will fit. Yes, this
// is just horrible heuristics. The sane thing would be if this w2ui code could itself make sure that the
// overlay thing grows in width if necessary as stuff is added to it so that they all show up.
if (window.ThisIsTheiOSApp && X > window.innerWidth - 300)
X = window.innerWidth - 300;
div1.css({
left : X + 'px',
top : Y + 'px',