Comments (6)
This is still the case on Firefox 34. Reopen the issue?
I'm willing to work on a fix, any hints on where to start are welcome.
from dragend.
Not on a computer right now, so cannot really check the flag, but what I learnt is that when you emulate mobile devices in Firefox and close firefox entirely it sometimes does not reset a flag that enables/disabled drag functionality. So dragging works in Firefox for "normal" users that do not use the dev tools. Double check this please.
from dragend.
Thanks for your quick response on this special evening! 🎄
That's a tricky thing you've tracked there. I suspected something like that so I restarted my machine but the problem persists.
I noticed that
isTouch = 'ontouchstart' in win
on line 100 of the source returns true
in Firefox and false
in Chrome. I don't know what this means but I feel that anything with touch should be false on my touchless laptop i.e. Chrome's answer is correct. I can imagine this may cause trouble somewhere down the line.
Update: setting isTouch = false
manually fixes the issue! However, this doesn't turn off the selection of text. Any idea how to switch that off? It will improve the experience in IE as well as text is selected while dragging with the mouse as well.
FWIW The broken swipe in Firefox isn't a real issue as I'm going to add scroll buttons anyway. I'm not a fan of swiping with the mouse. 😄
from dragend.
Yes, but what I meant is that you can reset the flag in about:config. The dev tools change this flag and do not reset it when you close them. It won't change on reboot either.
from dragend.
Ultimately it's a bug a normal user will never see. But someone using the dev tools might run into this case. Reseting Firefox to its factory state should remove the wrong setting too
from dragend.
Right, got ya. Good to know that flags aren't reset after restart/reboot.
In the meantime I fixed the issue: replace isTouch = 'ontouchstart' in win
with something like
isTouch = (win.ontouchstart !== null && win.ontouchstart !== undefined) ? true : false;
It turns out that Firefox' window object does have an ontouchstart
property. It's value is, however, equal to null
. Chrome doesn't have one hence the !== undefined
check.
Is this a sensible solution?
Text selection can be turned off with the CSS statment user-select: none;
.
Update Of course this was too easy, this change brakes swiping on Chrome and Firefox on Android. Hello there touch detection hell! I'm reverting to original solution and adding buttons. Merry Christmas. 😄
Update 2 To whom it may concern: win.ontouchstart
equals null
on Firefox (desktop and Android) and on Chrome (Android). It is equal to undefined
on Chrome (desktop). Go figure...
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.