Happened for me once in the iOS app, not sure if it was just a random
fluke while debugging, or whether it can happen in normal use. Anyway,
take it into consideration.
If the view count is zero, don't overwrite the '['.
Change-Id: Ia797d7cc99cc273e68ec184406f47283c9a647e2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100672
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
This patch is for preventing sidebar from being launched when:
* Document is on read only mode (No need for an editor bar when doc is read-only).
* Also the main reason for this patch was to hide Sidebar when revision history is open (NC).
Change-Id: I4d78c65a7e8f39b0827b9e23ecc24fcd9520fef8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100601
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
It seems there is a bug in sidebar showing code,
that it's not always shown by opening a document.
So instead of checking the visibility of sidebar,
just wait some time to finish document load.
Change-Id: I9d94b7fe085f4dfcf366789e27ab1bb388bf13b1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100675
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Our focus and blur back-and-forth dance does not seem to work on iOS
like it does on Android. So for now, never call the textarea element's
blur() function explicitly on iPhone.
Also don't play with the readonly attribute on iPhone.
Probably whether the calls to the textarea's focus() and blur()
functions actually do anything or not might depend on whether the call
stack originates in a user input event handler or not, for security
reasons.
Change-Id: I442f0c26ae5b36913235a7ef96820bff83535b76
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100611
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
When notebookbar is created calc-input-win is moved down.
This change takes into account that change and allows
us to handle click position correctly.
Change-Id: I7dd6f3ec7d65cd293721321b080626c61a84daf7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100649
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Otherwise client gets a notification that document is unmodified.
This should not happen, as the document in the storage has not been updated
and so it should be considered as modified until saving to storage succeeds.
Change-Id: I6918f97d96a546ce086f622854f4cbeed48d54ae
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100162
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
First grab the focus to the textarea, otherwise
the force: true flag leads to unexpected behavior.
Change-Id: Ic99bb1b22734733d7bb40b895173e5382c2ba5f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100605
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
When mobile wizard is opened and then we open the
hamburger menu without closing the mobile wizard the
showSidebar flag is not set to false. So when a
sidebar update comes from core then the hamburger
menu is replaced with the sidebar content.
Change-Id: I38601b3bf09309a62b2c3404f9ad27323c61cba1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100612
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Searching '-8px,' is not stable, because sometimes it's
'-9px,'.
Change-Id: I6226a1ec3086b84540d74cb1c7691cf355752337
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100600
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
It was not consistent what we used to type into the
document (e.g. 'body', 'textarea.clipboard' or
'#document-container'). Also we need to use force
parameter because 'textarea.clipboard' has no actual area
which makes cypress fail with: '`cy.type()` failed because
the center of this element is hidden from view'.
Change-Id: I04e0a82ed8450d583e407715fde1855197cae109
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100574
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
By default it is generated by automake,
but if someone wants to change manually,
do not forget to adjust this directory too.
Change-Id: I17e36364ac467d889e876be2995ef08e3c06da9e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100569
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
This is no longer need it because the orientation is manual
changed, adding or removing class styles and the patches
below were added to adapt the new changes
This reverts commit 69c21d5bb4d084cb8abc38b4176c8b40f12c8490.
Change-Id: I70aee6b569f78795487cbff736130e0e74165432
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100564
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100592
Tested-by: Jenkins
It happens when redirecting all the build output
to a specific directory
Change-Id: I084d35be1c72bd319515d642ddf5b4607f42cf6b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100567
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
by resizing the canvas only when the width/height of the map increases.
A canvas resize causes horrible flickering especially when the dpiScale
is not 1. This problem is more prevalent in mobile due to the on-screen
keyboard.
Change-Id: I10135d91f122eb751f16791476e09a45dbe09752
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100490
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
This should have been cleaned away when Map.Tap.js was removed in
a89d122479 "remove obsolete Map.Tap
handler".
Change-Id: Ic3946da8097089af1fb51e7b7a5f1c2e1b82c98b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100576
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
... if there is an active/visible cursor *and* it is out of the visible
map-area. The map position is so adjusted that the cursor will in the
center of the visible map area. This is needed for mobile(at least
android) because of the on-screen keyboard.
Note: We already do this for every 'invalidatecursor' message.
Change-Id: I3342a165ad47fe1b32715f3a6bf35486ba2f287c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100489
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
so that they do not get out of sync with the canvas on mobile/tablet
swipe/pan.
Note: This does not update the contents(path nodes) of the svg's. Note:
In the long term we can get rid of the map-pane scrolling and avoid all
this but right now only Calc is using canvas based tile layer.
Change-Id: Iaf6894b0fc39a2a32ac19d0e9acd6abb14336785
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100487
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
with updateInterval throttle like we do for desktop. This is necessary
for the inertia based scrolling on swipe especially when doing it
rapidly.
Change-Id: I870740c9b6cacfe56fce283f092cc68243fed1a6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100486
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
with full support and optimizations for split-panes. This includes some
refactors, for instance the prefetcher implementation is taken out of
the doc-layer methods as a L.TilesPrefetcher class.
Note: This only affects Calc as Writer/Impress are still using
L.TileLayer.
Change-Id: I0e43b58bad0a97d44cbffd1ee0d90d94a9426e29
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100485
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
... and also move the 'statusindicator' event generation code.
Change-Id: Ifdd9eb26d58986ce5fea8ea19f7dc7576d12743e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100484
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Fixes canvas update issues when browser window is resized (esp. when
making it larger) and also during sidebar switching.
Change-Id: I4870e5294b355c1bd0c4ca74b22383207ed9d060
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100483
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
... because the hammerjs swipe handler already uses a
requestAnimationFrame loop to fire move/drag events. Using
L.CanvasTilePainter's own requestAnimationFrame loop to do the updates
in that case results in poor UX/performance.
Change-Id: I2e31fb190b62f57bcb0bd00bec8b7ff4b7119aa1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100482
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
in containerPointToLayerPoint() and layerPointToContainerPoint() and
hence avoid its side-effects.
Note: L.point() does not copy-construct if the argument is already a
L.Point, so we need to call .clone()
This fixes unwanted scrolling of the map when drag-selecting cells.
Change-Id: If59852fa448c662b11a96d8b5681c59b673403b7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100481
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
... for the canvas to get the mouse-move+drag events and the various
touch events. This is needed because the canvas element (created by
L.CanvasTileLayer) is a sibling of the map-pane div and not a decendant.
Any change in canvas-size is also applied on the tile-container. Also if
there is a move event, counter adjust the tile-container position so
that it is precisely over the canvas at all times.
Change-Id: I5d5bc070c0063c5f24c4b1cb1448db0ce19841bd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100480
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Set _updatesRunning flag back to false after the loop is stopped.
Change-Id: I413d5beac4133326a4bc0b3d6729d03f77b20227
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100479
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
(and not just for 'moveend').
Change-Id: I487d22fff5e55741baa1a1d7f99798371fa3d284
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100478
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Leftover from hacking that lead to its addition?
Change-Id: Ic033ffc625613908ff57d27c10ffbba087ff03c4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100575
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
The default Poco connection timeout is 60 seconds,
which is probably excessive. The current configurable
default is a more reasonable 30 seconds.
Currently we set this timeout on Storage connections
going out (i.e. WOPI connections).
Change-Id: Ie80a9141ca9bf721addc74baf94e62e0ad72fdd2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98913
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
Our header parses was overly simplistic and
didn't support a number of corner cases that
rfc2616 specifies (folding, for example). The
new approach is to simply normalize the headers by
removing invalid line-breaks and then let the
MessageHeader parser take care of parsing the
headers individually, which we then set on the request.
The new utility setHttpHeaders should be used
whenever we need to set a header in an request
to make sure it are sanitized and valid.
Change-Id: Ifa16fa9364f42183316749276c5d0a4c556cb740
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96371
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
This yields a relevant Post request of:
slideshow.svg%3FWOPISrc=https:%252F%252Fshare....
slideshow.svg?WOPISrc=https%3A%2F%2Fshare....
Which ends up trying to serve a file with a ?WOPISRC= suffix.
Since we don't want anything 'odd' being served from the file-system
anyway; get a bit more paranoid and clean that up.
Change-Id: I39993e4629b0d01f34098391a0fa448ef8a9984e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100509
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
A known issue is that when the sidebar is updated
the focus is grabbed from the search field.
Change-Id: I762de7c6498f5b015465af325a24996719caeae1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100477
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
The sidebar is opened after the document is opened.
Opening the sidebar affects the whole layout, so better
to wait until it's finished before we start to interact
with the document.
Change-Id: I15537e8823d1c6c80fb586eb3560103b9173f37c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100442
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
They are especially efficient for small lookups.
Change-Id: Ia005f40127cf222debe185515fc45cd92b8ae752
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100413
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
The related issue was fixed upstream.
Change-Id: I8b1191d3c0d5543233ace9322a7d768b3424d62d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100435
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>