mpetroff/pannellum — pull request #15 by PhobosK (2014-09-06 08:26:46+00:00)
Title: [hotspots scene] Fix iOS onclick + hover bug

There is a bug in iOS/Mobile Safari that randomly prevents the *onclick* event when the clicked element has a *:hover* css rule (more info here: [Why your click events don't work on Mobile Safari](http://www.shdon.com/blog/2013/06/07/why-your-click-events-don-t-work-on-mobile-safari) ).

In the pannellum case when there is a hotspot connected to a scene, when one uses Mobile Safari (tests run on iPad Air - iOS 7.1.1 and iPhone 5 and 5S with a custom tour and with the original one on pannellum.org) clicking(touching) the hotspot doesn't always work properly. Mostly it does show the title of the scene as a tooltip (done by the css rules) and doesn't load the scene. The "offending" css rule is:
```
div.tooltip:hover span{
visibility: visible;
}
```
When you remove the rule, all works ok. But this is not a solution anyway...

So.. this is a proposed easy fix, tested and working ok. It uses the *ontouchend* event leaving the *onclick* for the browsers that do not support touch events.
The fix has a small disadvantage - to see the title of the scene one has to touch and hold the hotspot... but on Android the scene title even when only *onclick* event is present the scene title is not seen by default anyway (it appears for a very short time after the click event if the connection is fast).

Thanks