Skip to content

Commit 9542d09

Browse files
authored
fix(scrollbar): add 'touch-action: none' to swiper-scrollbar (#7024)
- '-ms-touch-action' is not supported by Firefox, Firefox for Android, Safari, Samsung Internet. Add 'touch-action' to support Firefox 52+, Firefox for Android 52+, Safari 13+, Samsung Internet 3.0+.
1 parent 96e5166 commit 9542d09

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/modules/scrollbar/scrollbar.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
border-radius: var(--swiper-scrollbar-border-radius, 10px);
1616
position: relative;
1717
-ms-touch-action: none;
18+
touch-action: none;
1819
background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));
1920
.swiper-scrollbar-disabled > &,
2021
&.swiper-scrollbar-disabled {

src/modules/scrollbar/scrollbar.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
border-radius: var(--swiper-scrollbar-border-radius, 10px);
1818
position: relative;
1919
-ms-touch-action: none;
20+
touch-action: none;
2021
background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));
2122
.swiper-scrollbar-disabled > &,
2223
&.swiper-scrollbar-disabled {

0 commit comments

Comments
 (0)