Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
c46a0c7e
Commit
c46a0c7e
authored
6 years ago
by
patrickhlauke
Committed by
XhmikosR
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Replace touch-action: none with pan-y, remove preventDefault from touch event handling
parent
9cc237d0
1 merge request
!28721
Hot test
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/src/carousel.js
+0
-3
js/src/carousel.js
scss/_carousel.scss
+1
-1
scss/_carousel.scss
with
1 addition
and
4 deletions
+1
-4
js/src/carousel.js
+
0
-
3
View file @
c46a0c7e
...
@@ -283,14 +283,11 @@ class Carousel {
...
@@ -283,14 +283,11 @@ class Carousel {
if
(
this
.
_pointerEvent
&&
(
event
.
originalEvent
.
pointerType
===
PointerType
.
TOUCH
||
event
.
originalEvent
.
pointerType
===
PointerType
.
PEN
))
{
if
(
this
.
_pointerEvent
&&
(
event
.
originalEvent
.
pointerType
===
PointerType
.
TOUCH
||
event
.
originalEvent
.
pointerType
===
PointerType
.
PEN
))
{
this
.
touchStartX
=
event
.
originalEvent
.
clientX
this
.
touchStartX
=
event
.
originalEvent
.
clientX
}
else
if
(
!
this
.
_pointerEvent
)
{
}
else
if
(
!
this
.
_pointerEvent
)
{
event
.
preventDefault
()
this
.
touchStartX
=
event
.
originalEvent
.
touches
[
0
].
clientX
this
.
touchStartX
=
event
.
originalEvent
.
touches
[
0
].
clientX
}
}
}
}
const
move
=
(
event
)
=>
{
const
move
=
(
event
)
=>
{
event
.
preventDefault
()
// ensure swiping with one touch and not pinching
// ensure swiping with one touch and not pinching
if
(
event
.
originalEvent
.
touches
&&
event
.
originalEvent
.
touches
.
length
>
1
)
{
if
(
event
.
originalEvent
.
touches
&&
event
.
originalEvent
.
touches
.
length
>
1
)
{
this
.
touchDeltaX
=
0
this
.
touchDeltaX
=
0
...
...
This diff is collapsed.
Click to expand it.
scss/_carousel.scss
+
1
-
1
View file @
c46a0c7e
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
}
}
.carousel.pointer-event
{
.carousel.pointer-event
{
touch-action
:
none
;
touch-action
:
pan-y
;
}
}
.carousel-inner
{
.carousel-inner
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets