mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-01-16 21:08:28 +01:00
fix vertical swipe navigation not blocking page scrolling in embedded decks
This commit is contained in:
parent
d4e5c39fe4
commit
924bdb6305
@ -631,11 +631,16 @@ $controlsArrowAngleActive: 36deg;
|
||||
touch-action: pinch-zoom;
|
||||
}
|
||||
|
||||
// Swiping on an embedded deck should not block page scrolling
|
||||
// Swiping on an embedded deck should not block page scrolling...
|
||||
.reveal.embedded {
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
// ... unless we're on a vertical slide
|
||||
.reveal.embedded.is-vertical-slide {
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.reveal .slides {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
2
dist/reveal.css
vendored
2
dist/reveal.css
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.esm.js
vendored
2
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.esm.js.map
vendored
2
dist/reveal.esm.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js.map
vendored
2
dist/reveal.js.map
vendored
File diff suppressed because one or more lines are too long
@ -103,6 +103,8 @@ export default class Touch {
|
||||
*/
|
||||
onTouchStart( event ) {
|
||||
|
||||
this.touchCaptured = false;
|
||||
|
||||
if( this.isSwipePrevented( event.target ) ) return true;
|
||||
|
||||
this.touchStartX = event.touches[0].clientX;
|
||||
|
@ -1446,6 +1446,9 @@ export default function( revealElement, options ) {
|
||||
let currentHorizontalSlide = horizontalSlides[ indexh ],
|
||||
currentVerticalSlides = currentHorizontalSlide.querySelectorAll( 'section' );
|
||||
|
||||
// Indicate when we're on a vertical slide
|
||||
revealElement.classList.toggle( 'is-vertical-slide', currentVerticalSlides.length > 1 );
|
||||
|
||||
// Store references to the previous and current slides
|
||||
currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user