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

Turn Off Hover on Ipad and Iphone #22

Closed
uxdedotnet opened this issue Mar 11, 2013 · 12 comments
Closed

Turn Off Hover on Ipad and Iphone #22

uxdedotnet opened this issue Mar 11, 2013 · 12 comments

Comments

@uxdedotnet
Copy link

Hi Joeld, I just had an error with superfish when test it on Ipad. I can't turn off the drop down menu after click it. Please help me fix this error.

Thanks!

@uxdedotnet
Copy link
Author

My website is: http://www.uxde.net/test/codilight/

@stevengliebe
Copy link

I notice what might be the same issue on the demo. With iOS go to http://users.tpg.com.au/j_birch/plugins/superfish/ > Examples > Basic and touch to open the first dropdown. Now touch on the blue header. The menu does not close when you touch there, but it closes if you touch anywhere else. Same issue?

I am also experiencing something similar with my own design. On iOS the opened menu will not close no matter where I touch, unless it's a text input (as with @uxdedotnet's demo) and in my case one very specific unlinked image. Nothing else triggers the close for some reason.

I hope this sheds some light because I haven't been able to figure out why this sort of thing happens.

@stevengliebe
Copy link

Here's a fiddle that shows the issue in a very basic way. It's based on code from the demo.

http://jsfiddle.net/bVvu5/4/embedded/result/

@joeldbirch
Copy link
Owner

Thanks for the examples. I'm aware of this issue.The cause is the non-standard way Apple has attempted to simulate ':hover' without also simulating unhover. I have various fixes, one of which I will decide upon and release soon. I'm busy over the next day or so, but it will be out as soon as possible.

@stevengliebe
Copy link

Thank you, that's good to hear.

@uxdedotnet
Copy link
Author

Thanks Joeld and Steven :)

@jsgalloo
Copy link

At the present time, i added this to permit closing sub menu:

var isiOS = navigator.userAgent.match(/iPad|iPhone|iPod/i) != null;

            if (isiOS) 
            {
                $(document).on('click touchend', function () {
                        $('ul.sf-menu').hideSuperfishUl();
                });

                $(".sf-menu").click(function(e){
                        e.stopPropagation();
                });
            }

but we can see the highlight of the click in document. It works but it is a trick

@joeldbirch
Copy link
Owner

Thanks. I've got something similar to this in the upcoming v1.6.0. I may also add some CSS to hide the click highlight.

@joeldbirch
Copy link
Owner

You can find fixes for this in v1.6.0. The hover state is also reset properly after using the iOS back button, which was another iOS problem.

@jsgalloo
Copy link

Thanks very much,
i confirm it work on iOS (iPhone, iPad).

@stevengliebe
Copy link

Thank you for this update. Works very nicely on iOS now.

@atatos
Copy link

atatos commented Apr 9, 2014

Nice solution, Thanks @jsgalloo

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

5 participants