Vue.draggable: cannot set scrollSensitivity

Created on 1 Apr 2019  路  9Comments  路  Source: SortableJS/Vue.Draggable

Since scrolling with fixed elements was reported many times without a solutions here, here and here
I tried to use the solution here by increasing scrollSensitivity and setting forceFallback to true.

It seems that these options has no effect. I tried to comment the footer out to text without fixed elements and it seems the the scrollSensitivity is not changes

Jsfiddle link

https://jsfiddle.net/alali/smnjvfdx/

Is there any workaround for the fixed element problem?
It seems that after the last update options are not assigned correctly. I checked the documentations and tried using v-bind too which did not work. Any idea how to solve this?

Most helpful comment

@odai-alali Please check the updated fiddle based on @owen-m1 feedback:
https://jsfiddle.net/dede89/s25p19hj/

The key is option has to use kebab-case since jsfiddle uses html template

All 9 comments

Options are working fine.
Remove forcecallback and sort options and it will work:
https://jsfiddle.net/dede89/s25p19hj/

No it's not. I am testing on chrome, nothing has changed.

What is the scenario step by step?

  1. grab an item and drag down. the list will scroll since there is no footer (when you are too close the edge, so scrollSensitivity is not 190)
  2. with the list scrolled down (there is items outside the list view) try to drag an item to the top of the list. the list does not auto scroll upwards since there is a fixed element in the top of the page

scr

Ok understoo. Using the updated jsfiddle the option scrollSensitivity is correctly passed to sortable, but the behavior continues as you describe. @owen-m1 could you take a look at this one?

The reason is that it is using the native browser's autoscroll, since forceFallback is not working. Although it seems that :forceFallback="true" is specified, but it is still using native drag and drop, so the option must not be being passed properly.

@odai-alali Please check the updated fiddle based on @owen-m1 feedback:
https://jsfiddle.net/dede89/s25p19hj/

The key is option has to use kebab-case since jsfiddle uses html template

Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iou90 picture iou90  路  3Comments

AlexandreBonneau picture AlexandreBonneau  路  3Comments

parthibeyond picture parthibeyond  路  3Comments

AnnaStuehlmeyer picture AnnaStuehlmeyer  路  3Comments

Nrqz picture Nrqz  路  3Comments