[Libreoffice-bugs] [Bug 125389] Can't scroll page after moving a picture/shape

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu May 30 13:30:12 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=125389

--- Comment #4 from Tor Lillqvist <tml at iki.fi> ---
The problem seems to be caused by an uncaught exception in the
getMousePosition() function in L.DomEvent in loleaflet/src/dom/DomEvent.js.
When it is called at the end of the drag moving the image, e.touches has zero
length, so trying to use e.touches[0] causes an exception. I changed it to use
e.changedTouches instead. Not sure whether it makes any sense, but at least it
makes the problem go away.

The caller of getMousePosition() is mouseEventToContainerPoint() in
loleaflet/src/map/Map.js, and the caller of that is _onDragEnd() in
L.Handler.PathDrag in loleaflet/plugins/path-transform/src/Path.Drag.js. All
the lines of code that _onDragEnd() would have executed after calling
mouseEventToContainerPoint() get skipped because of the exception. Presumably
it is those lines of code that are supposed to reinstate the normal scrolling
behaviour.

Likely it does not make sense to call mouseEventToContainerPoint() in that
_onDragEnd() as a touchend event by definition is fired when the touch has
finished, and there no longer is any current "mouse" position. w3schools.com
says "The touches property returns an array of Touch objects, one for each
finger that is currently touching the surface", and as the touch has ended, no
finger is touching the surface any longer. Or is this browser dependent?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190530/6aa23e96/attachment.html>


More information about the Libreoffice-bugs mailing list