Skip to content

There is no ability to trigger custom scroll from Sortable if scroll container has overflow: hidden property #1676

Open
@IgorLav

Description

@IgorLav

Problem:

There is no ability to trigger a custom scroll from SortableJS if the scroll container has overflow: hidden property.
Most of custom scroll plugin use overflow hidden for scroll container, to prevent showing native scrollbar and display custom one.
The following code prevents triggering on scrollCallback. Please, add a check of overflow: hidden
if there is !winScroller;

if (el === winScroller) {
...
} else {
canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
}

FILE: sortable.core.esm.js
LINES: 2873, 2874

JSBin/JSFiddle demonstrating the problem:

https://jsbin.com/xecihez/edit?html,js,output

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementQuality of life changes to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions