Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 8f9a6be

Browse files
HitomiWinboilund
authored andcommitted
fix(slider): drag slider on small screen
Add css touch-action:none to prevent pointer-event will be canceled by touch-event Fixes: #294
1 parent e043e88 commit 8f9a6be

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/core/src/Slider/__snapshots__/index.test.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exports[`Slider Levels 1`] = `
77
grid-auto-flow: row;
88
padding: 8px;
99
width: 100%;
10+
touch-action: none;
1011
}
1112
1213
.c5 {
@@ -269,6 +270,7 @@ exports[`Slider Levels 2`] = `
269270
grid-auto-flow: row;
270271
padding: 8px;
271272
width: 100%;
273+
touch-action: none;
272274
}
273275
274276
.c5 {
@@ -584,6 +586,7 @@ exports[`Slider Levels 3`] = `
584586
grid-auto-flow: row;
585587
padding: 8px;
586588
width: 100%;
589+
touch-action: none;
587590
}
588591
589592
.c5 {

packages/core/src/Slider/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const Container = styled.div`
3939
grid-auto-flow: row;
4040
padding: ${spacing.medium};
4141
width: 100%;
42+
touch-action: none;
4243
`
4344
// The holder for the knob
4445
const Rail = styled.div`

0 commit comments

Comments
 (0)