Skip to content

Commit f094f68

Browse files
Merge pull request #1 from anders-lassen/check-for-disabled
Added extra disabled check
2 parents d7e1f08 + 3e23689 commit f094f68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/components/Drag/Drag.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function Drag( Splide: Splide, Components: Components, options: Options )
148148
emit( EVENT_DRAG );
149149
}
150150

151-
if ( e.cancelable ) {
151+
if ( e.cancelable && ! disabled ) {
152152
if ( dragging ) {
153153
Move.translate( basePosition + constrain( diffCoord( e ) ) );
154154

@@ -183,7 +183,7 @@ export function Drag( Splide: Splide, Components: Components, options: Options )
183183
emit( EVENT_DRAGGED );
184184
}
185185

186-
if ( dragging ) {
186+
if ( dragging && ! disabled ) {
187187
move( e );
188188
prevent( e );
189189
}

0 commit comments

Comments
 (0)