ngx-sortablejs icon indicating copy to clipboard operation
ngx-sortablejs copied to clipboard

Not scrolling when mouse x coord smaller than scrollSensitivity

Open ZelimDamian opened this issue 6 years ago • 6 comments

To reproduce:

  1. Open https://smnbbrv.github.io/angular-sortablejs-demo/custom-options
  2. Scroll to the middle of the "Autoscroll with fixed navbar"
  3. Grab any item near the left most border (for instance next the the first E in Element)
  4. Drag the item upwards while keeping the mouse near the left edge (no horizontal movement)
  5. Observe that no upwards scrolling occurs when moved all the way to the top of the page

MacOS Chrome Version 70.0.3538.110 (Official Build) (64-bit)

The above described issue also occurs in the downwards direction when there is a fixed footer at the bottom of the page.

ZelimDamian avatar Dec 05 '18 21:12 ZelimDamian

I tried to replicate the issue with the original Sortable.js library: https://output.jsbin.com/xamufuviwe/1 and see no issue.

ZelimDamian avatar Dec 05 '18 21:12 ZelimDamian

This is an original library issue. In your example you use the latest library file from github, but it is not the latest version on NPM. In other words, the file on github is not published to NPM repo.

Try with https://unpkg.com/[email protected]/Sortable.js on your jsbin instead, you will see the bug you described.

If you want to use the latest version, it may worth it to try to copy sortablejs file to your repo and override the typescript path for sortablejs, e.g. like here https://stackoverflow.com/questions/43281741/how-to-use-paths-in-tsconfig-json

smnbbrv avatar Dec 06 '18 06:12 smnbbrv

Thank you for the clarification. I changed the library as instructed, but still have no issue. Am I doing something wrong? https://jsbin.com/vemupux/2/edit?html,js,output

ZelimDamian avatar Dec 07 '18 12:12 ZelimDamian

ehm. For me it does not work on your jsbin in the same way you described. Did you try it? :)

I mean, I scroll down, take the very left pixels to drag and the scroll does not work.

smnbbrv avatar Dec 08 '18 07:12 smnbbrv

This is how it works for me with the original library (https://jsbin.com/vemupux/2/edit?html,js,output): asdf This is the closest reproduction of how it works with the angular version (https://smnbbrv.github.io/angular-sortablejs-demo/custom-options): asdf

Note that this issue does not necessarily occur on mobile sized screens only. Also note that it works when the mouse x coord is greater than scrollSensitivity value.

ZelimDamian avatar Dec 08 '18 12:12 ZelimDamian

Did this ever get fixed as I have the same issue :(.

COBRASoft5 avatar Feb 16 '22 15:02 COBRASoft5