Description: After moving a picture (or shape) in a writer document in the iOS app the page can't be moved anymore. Steps to Reproduce: 1. Write some text in the iOS app, scroll the page using the finger 2. Insert a picture or a shape and move it on the page 3. Try to scroll the page Actual Results: The page can't be moved with the finger. Expected Results: The page can't be moved with the finger. Reproducible: Always User Profile Reset: No Additional Info: I'll upload a video that shows the issue.
Created attachment 151534 [details] Video demonstrating the issue This happens with pictures and also with shapes. In the case of shapes, it often happens, that additional shapes are pasted.
Looking at this now.
The same problem is visible also in Safari on iOS against normal Online.
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?
Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/online/+/6478015ccbf7ee49b026820960edac4401334cd2%5E%21 tdf#125389: Guard against exception if e.touches is zero length