Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile vertical scrolling broken when touching juxtapose element #148

Open
alucav opened this issue Apr 13, 2019 · 1 comment
Open

Mobile vertical scrolling broken when touching juxtapose element #148

alucav opened this issue Apr 13, 2019 · 1 comment

Comments

@alucav
Copy link

alucav commented Apr 13, 2019

See attached for our implementation. The problem with this is that, on mobile, Juxtapose takes over the vertical touch. That means that the user is unable to scroll up and down on the page and is effectively stuck.

This is unnecessary, since juxtapose really only requires X-axis data to function. Can someone help me make an adjustment to the JS such that if horizontal mode is selected, the Y axis is left alone so that the user can continue to scroll up and down on the page AND use the juxtapose element at the same time?

image

Any assistance would be welcomed here, will Venmo someone $50 if they help.

-B

@alucav
Copy link
Author

alucav commented Apr 14, 2019

wellll if anyone stumbles upon this and has a similar requirement, simply comment out e.preventDefault(); in the event listeners for touchstart and touchmove:

this.slider.addEventListener("touchstart", function(e) {
        e = e || window.event;
        //e.preventDefault();
        e.stopPropagation();
        self.updateSlider(e, true);

        this.addEventListener("touchmove", function(e) {
          e = e || window.event;
          //e.preventDefault();
          e.stopPropagation();
          self.updateSlider(event, false);
        });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant