Steps to Reproduce
Run fiddle: https://zkfiddle.org/sample/1955k98/5-Another-new-ZK-fiddle
Scroll down a little, drag image to page
Current Result
The dropupload anchor position is shifted by the browser scroll position
Expected Result
Drop upload anchor position matches the anchor
Debug Information
Dropupload _dragShow() function finds anchor position using
ofs = $anchor.offset()
Which includes the scroll position of the browser into the offset.
However, the dropupload sets the the CSS position:static property on the component, so it doesn't need to also be offset by browser scroll position
Workaround
Do not scroll browser, instead have a window containing the whole UI with the data-scrollable attribute:
<zk xmlns:ca="client/attribute"> <window title="bug drop upload" border="normal" vflex="1" contentStyle="overflow:auto;" ca:data-scrollable="true"> UI CONTENT HERE </window> </zk>
alternatively, use JS workaround in attached fiddle.
(JS workaround is overriding a lot of functions, so only use if necessary)