Some mobile devices support both pointer and touch events,
so if we add event listener it will fire 2 times.
Change-Id: Ida9862e9ee24e47ccbe3963b5c4ff18a173fffe0
Reviewed-on: https://gerrit.libreoffice.org/82799
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
When the frame is null, it is referring to a container frame window that
it is always not accessible.
Change-Id: Ie96a05327928b2b72ce5577409e368061b2afa1e
Reviewed-on: https://gerrit.libreoffice.org/82798
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
The _coordinates function is called several times to compute
the same coordinate value.
Change-Id: I6e187b74709515ddde77d60649e564cb2b484fb4
Reviewed-on: https://gerrit.libreoffice.org/82797
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Scrolling with selected sheet was endless.
This change allows scrolling using mouse wheel
when scrollbar is close to the end of screen
and prevents from doubled updates.
Extension of work done before in:
ec24337b11
Change-Id: Id76818158c0d9988b323ec52a408efd5ae6a9da5
Reviewed-on: https://gerrit.libreoffice.org/70266
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
This will then re-introduce another issue, that the document view
jumps to the caret position when zooming, but that is a less serious
issue.
Change-Id: Iac22f4c2bc753e4311bd6c646c85937ee24b08e5
Don't check window.ThisIsAMobileApp but instead use a much more
convoluted test to catch only the cases where we do want the document
to be scrolled, and ignore the case that causes the irritating
jumping.
In _onUpdateCursor() in TileLayer.js, we know that the scroll
parameter is not undefined when and only when _onUpdateCursor() is
called from _onInvalidateCursorMsg(). We pass that information down to
the onUpdate callback handler passed to the _tweenTo() function in the
_scrollTo() function in jquery.mCustomScrollbar.js where it shows up
as property of the options object.
In that location we also make use of the incidental fact that
options.timeout==1 only when that code is called from mouse-wheel scrolling.
Quite possibly all this could be done much cleaner.
Change-Id: Iefa257bceb54137f25534ccb6786c1d2e315931c
My previous commit broke scrolling for normal Online with touchpad
(and presumably wheel mouse). So do it only in the mobile app case.
Change-Id: Ia085549b66ed4584c75d5efb78948f19a33c7907
Unlike my previous (reverted) attempt, now scrolling using the
scroll-bar keeps working.
Seldom has coming up with an one-liner been as painful as in this case.
But that's how 3rd-party JavaScript is, I guess.
Change-Id: I18c26da7b41d7e12dd63763651010641ca2a0069
Reviewed-on: https://gerrit.libreoffice.org/63718
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(Only for mobile devices for now. I am not brave enough to do it also
for mobile device browsers using a normal Online.)
Likely breaks rendering of the scroll bars somewhat.
Change-Id: I40bf1cb29fc99ba808b8bb570691d96019a1f8f7
Reviewed-on: https://gerrit.libreoffice.org/63437
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
We want this file to stay as it was in upstream, so please do continue
to use TABs in it, and 8 column tab width.
Change-Id: Id355ac32bbe899470d4f66c4cf84fef3f3add0d8
Reviewed-on: https://gerrit.libreoffice.org/63436
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
I plan to add some hacks into it to fix the horrible jumping around
after touch-based interaction, specifically for the iOS app.
Change-Id: Ia6cfbfe7f487b52ba7652e49eb3fdb59af0c82ae