alvarotrigo / fullPage.js

fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
http://alvarotrigo.com/fullPage/
GNU General Public License v3.0
35.27k stars 7.3k forks source link

Touch events on different element #2919

Closed richgcook closed 7 years ago

richgcook commented 7 years ago

If I have a panel over the fullPage element then on desktop it still works (as it’s controlled by mouse/keyboard and not touch on the actual element) but in touch devices obviously this doesn’t work. Is there any way to allow touch events when the element to be scrolled is behind a panel?

alvarotrigo commented 7 years ago

The description is not clear enough to me. Please be more specific and provide a reproduction or at least a video or image illustrating your issue.

richgcook commented 7 years ago

Sorry, yes.

http://dev.braw.io/junk-shop-creative/projects/m-s-for-vogue/

If you scroll down and get to the last slide, a separate 'layer' will scroll up and over and the mouswheel/keyboard still works to get rid of it but on a touch device you obviously cannot 'touch' the fullPage element as the layer is over it. Is there any way to ignore this 'layer' for touch (almost like touch-events: none so the fullPage element behind still fires the touch events?

alvarotrigo commented 7 years ago

Try placing the layer within the fullPage.js container, inside a section.

alvarotrigo commented 7 years ago

Did you try what I suggested?

richgcook commented 7 years ago

@alvarotrigo It might've worked but went with the following (using hammer)

$('section.projects__meta').hammer().data('hammer').get('swipe').set({
    direction: Hammer.DIRECTION_ALL
});
$('section.projects__meta').hammer().on('swipedown', function() {
    $('body').removeClass('is--near-bottom');
});