I noticed that flashing as well. I need to take a closer look at enabling a timer in this function, because it needs to respond to a more deliberate hover rather than the stray events created by moving the mouse elsewhere. I don’t have time to look into that at the moment, but maybe it will occur to me later. It’s an issue with many mouseover handlers.
Yes, there isn’t a mouseout event on the iPhone at all, because there isn’t a mouse. You could create a handler for the ontouchend event that could close the element if it’s open, but you’d have to be careful how you apply that. If there is content inside the tab that your users need to touch, then this could booby-trap that interaction.
Something like this:
var restore_if_open = function(evt){
if(parseInt(this.getStyle('margin-top'), 10) == 0)
this.morph(this.tabbed, {duration: 0.6});
};
//at the end of the invoke chain, exchange the trailing semi-color for a dot, and add
invoke('observe', 'touchend', restore_if_open);
That’s not tested, but it might work. If it doesn’t, then exchange the touchend for a touchstart and see if that does it. It’s a tricky thing, intercepting these generated events. Apple helpfully maps the mouseover to the click event, I’m not sure what it does with the native touch events when it does so. If it swallows them, which seems logical, then the first of these should work. Finally, you may end up using the click event instead. That will close the tab if you click on it, in either in a desktop or a mobile browser. Because the click event that iOS “shims” into the mouseover is not a native click, it shouldn’t be captured by this handler, but again, that’s something to experiment with.
Walter
On May 30, 2013, at 9:38 AM, RavenManiac wrote:
Walter, I noticed that when you run your mouse back and forth sometimes the boxes flash. Is there anyway to prevent that?
Also, on an iPhone you can raise the boxes with a click, but you cannot lower them by clicking on the same box. Any way around that?
Thanks!
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options