Comments (12)
Hi, thanks for the bug report. I'll try to fix this as soon as possible.
from dragend.
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.
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.
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.
@pedroaragon360 Can you create a pull request if you think this is bug that should be solved :)?
from dragend.
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.
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.
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.
@pedroaragon360 is it the fix that doesn't work on IE11 or the whole lib?
from dragend.
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.
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.
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)
- The demo: with-control-elements does not work properly
- Block left/right swiping whilst scrolling vertical
- Last page aligned on right
- rtl support HOT 1
- One fix, One upgrade HOT 2
- Uncaught TypeError: this.container.hammer is not a function
- RC3: Last page doesn't show when using "new Dragend".
- Dragend not playing well with Onsen Splitter & Navigator HOT 1
- Resizing issue HOT 1
- How get current position web HOT 3
- What direction did I swipe? HOT 1
- Children events removed
- Too much height at bottom after rendered HOT 1
- Page with owl-carousel content inside it breaks when applying dragend()
- Keyboard navigation is inverted HOT 2
- Require.js HOT 3
- Dragend inside dragend?
- Dragend With Bootstrap (Modal Not Work Well)
- Ipad 2 and Ipad 3
- Vertical scrolling for each individual page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragend.