woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.92k stars 1.7k forks source link

IE10 Touch doesn't work #215

Closed alirobe closed 9 years ago

alirobe commented 12 years ago

Hey, so just testing out flexslider on a Win8 slate PC here, and noticing that touch isn't behaving as expected in IE. Any chance of implementing the Microsoft touch API?

edit: here is some info on the touch API in IE10 http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx || http://msdn.microsoft.com/en-us/library/windows/apps/hh767313.aspx

I will be happy to be a tester if someone can try this out.

tb623 commented 11 years ago

Using the 2.2.0 release, If you move the event listener declaration on line 397:

el.addEventListener('touchstart', onTouchStart, false);

to be below the onTouchStart function declaration, all browsers for Windows 8/touch-enabled appear to be happy, including Firefox.

mattyza commented 11 years ago

Thanks for your excellent feedback, Tiffany! :)

Everyone else out there with Windows 8 touch-enabled devices, please test the fix provided by Tiffany and advise if this works for you as well.

nemzes commented 11 years ago

Please note that the issue mentioned above re. Firefox is not related to the order of the function declarations, but due to the fact of them being declared within a block — which breaks the ECMAScript spec. See #806.

mattyza commented 11 years ago

Thanks for your additional clarification, @nelsonmenezes. I see you've submitted a pull request to remedy this.

We'll get it merged into a development branch soonest and we can all test from there. :)

edraven commented 11 years ago

On a Windows Mobile Phone (Nokia Lumia 920) using flexslider 2.1, it won't swipe at all, but you can still scroll down the page. Using flexslider 2.2, it will swipe, but it prevents scrolling down the page, perhaps because the entire top of the page is a flexslider carousel. Works fine on Android, but on Windows Mobile it'll try to select text when you swipe to scroll down, or nothing will happen. Sometimes, very rarely when you have some text highlighted it will scroll down, but I can't figure out how to reproduce it. Anyone have an idea on how to solve this?

FriendlyWP commented 11 years ago

@tiffanybroadbent's fix works for me on Windows 8 on all browsers (Chrome 29, FF 23, IE 8/9/10). Any news on when this fix will be pushed out? Thanks!

oilvier commented 10 years ago

@edraven I have the same problem on Nokia Lumia 520. I'll be glad to have a solution to fix this as well

sailenk commented 10 years ago

@edraven @oilvier We are having same problem with Nokia 925 Windows 8, swipe works fine but can't scroll up and down. Any updates on this?

jonnott commented 10 years ago

Can we have a minor release with this Firefox/Firebug onTouchStart error problem fixed?

sheltonjb commented 10 years ago

Same problem as Olivier here, on the same device. Nokia Lumia 520. it scrolls down the page fine, until the moment you scroll sideways through the carousel. once that action has been done it losesthe ability to scroll down the page. seems to be it can do one or the other, not both.

todesstoss commented 10 years ago

for version 2.2 to allow scroll down the page you should change el.style.msTouchAction = "none"; line 470 to this code:

el.style.msTouchAction = "pan-y";

but also you can fix it from css adding new style for flexslider container flexslider{touch-action: pan-y !important; if u don't want change plugin's code directly.

I have another issue with windows phone: if slider elements wrapped in link element, after each slide it redirects me to this link, i want to use this links only on touch, not move. flexslider>ul.slides>li>a>[img/or any other content]

ghost commented 10 years ago

I did get the same error, but on android devices using the flexslider on firefox. The error was: ReferenceError: onTouchStart is not defined @ http:/.........../js/woothemes-FlexSlider-ca347d4/jquery.flexslider.js:397

What happend was that the call: el.addEventListener('touchstart', onTouchStart, false); was calling the onTouchStart that was defined after it is called. The fix is to place it under the function, and all works fine, )

sheltonjb commented 10 years ago

Thanks very much todesstoss, that worked perfectly.

what implentations does that have though? would it originally have been none? must have been a reason.

cheers

todesstoss commented 10 years ago

I think it's simple mistake, u can read more about this property here: http://msdn.microsoft.com/en-us/library/ie/hh772044(v=vs.85).aspx none: The element permits no default touch behaviors. but we need permition on the vertical axis.

shekhar87 commented 10 years ago

Thanks! @todesstoss .. It worked for me..:)

oilvier commented 10 years ago

Thank you @todesstoss, it also worked for me !

Cheers ;)

richiebee commented 10 years ago

so what is the correct fix to enable touch sliding on windows 8 -"The fix is to place it under the function, and all works fine, )" can someone provide the correct code and where to replace/add please?

remayex commented 10 years ago

Thanks barry76, your fix is working perfectly It was competly breaking Flexslider on Firefox for Android Altough it was not exactly the subject of this issue, please add this fix to next versions. Thanks

timbouchard commented 10 years ago

@todesstoss good fix for the Y axis scroll!