Giter Club home page Giter Club logo

Comments (12)

Stereobit avatar Stereobit commented on July 16, 2024

Hi, thanks for the bug report. I'll try to fix this as soon as possible.

from dragend.

Stereobit avatar Stereobit commented on July 16, 2024

Hi,

this problem seems to be related to the event bubbling of the drag events when you have a dragend container in a dragend container. I've added a stopPropagation option to prevent bubbling of all events. For the demo it helps.

I also added a quickfix for Firefox. The behaviour is still a bit buggy when having nasted dragend container but at least it works now.

from dragend.

netpoetica avatar netpoetica commented on July 16, 2024

Thanks for looking into this. The vertical swipe on your main page is still very buggy in Chrome - the calcNewPage function doesn't seem to work, the smooth "glide" into next page is very jumpy. Additionally, it now resets the vertical slider.

https://www.dropbox.com/s/rqxdqjx411bzpf0/dragend-vertical.mov

from dragend.

pedroaragon360 avatar pedroaragon360 commented on July 16, 2024

I found an easy fix. It is true that there is a bug when you slide to the left, as it doesn't come back to the original position if the threshold is not reached, curiosly this doesn't happen when dragging towards right (forward).
How to fix it:
Change this:

} else if (parsedEvent.distanceX > 0 || parsedEvent.distanceX > 0) {
this._scrollToPage();
}

to this

} else {
this._scrollToPage();
}

Apparently, the if verification doesn't come true when verifying the threshold distance backwards, so if you ommit that if, it will always go back to the original place if the forward/back page event doesn't apply.

from dragend.

Stereobit avatar Stereobit commented on July 16, 2024

@pedroaragon360 Can you create a pull request if you think this is bug that should be solved :)?

from dragend.

pedroaragon360 avatar pedroaragon360 commented on July 16, 2024

My first pull. Great script by the way, but it would be great if you find time to fix scrolling, my solution (shown in the other issue thread) may be inefficient, and have to work with two listeners...
Thanks.

from dragend.

Stereobit avatar Stereobit commented on July 16, 2024

Thanks. I'll have a look into the pull request soon. Not sure if it doesn't raise other bugs when you remove that conditions. I'll try to solve the scrolling as soon as I find some more time ...

from dragend.

pedroaragon360 avatar pedroaragon360 commented on July 16, 2024

Great, but I just found out that it doesn't work with IE 11 (including last release) nor Windows phone, its a petty.. shame I can't be of much help there.

from dragend.

netpoetica avatar netpoetica commented on July 16, 2024

@pedroaragon360 is it the fix that doesn't work on IE11 or the whole lib?

from dragend.

pedroaragon360 avatar pedroaragon360 commented on July 16, 2024

The script itself seems not to work in IE 11, my fix resolves the issue we talked about without any subyacent bugs, at least that I could experience.

from dragend.

netpoetica avatar netpoetica commented on July 16, 2024

Interesting. I do not have access to IE11 unfortunately but I would be curious if it is an error that is occurring (like you would see the error in the console) or if the script simply just doesn't do anything?

from dragend.

pedroaragon360 avatar pedroaragon360 commented on July 16, 2024

I dont see any errors in the console, it looks like the events don't work. I have made a timeout loop script which forces the slides to move, and they work, what it does not work is the swipe event listener, it just doesn't do anything, like it does not recognice the interaction.
I am sorry for this series of bugs, but as I need to use some production scripts, I look forward on using this:
http://www.idangero.us/sliders/swiper/demos.php

It may help looking the code up for inspiration?

from dragend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.