[Pro] Rollover problems

A click is actually a compound event. It occurs when a mousedown and mouseup have happened within the screen bounds of the listening object. You can see this in Mac OS if you click the mouse button down on a button, then slide the cursor off of the button and release the mouse after the cursor is outside the bounds of the button. The effect will be as if you did not click the button at all, or tried to and missed it.

The “click” visual state that you are referring to is actually the mousedown state. It cannot be triggered by a click handler, because the click doesn’t fire until after the button has been released and mouseup has fired.

The Rollover Action creates handlers for either the mouseover/mouseout events or the click event. As far as I know, it does not handle the mousedown/mouseup pair directly. There is no un-click event to handle resetting things, because click fires after the mouseup, not before. So the only possible visual feedback would be click (mouse released) and stick (visually) until something else is clicked.

If you are using this Action on a link to a new page, there’s another wrinkle here. In Safari at least, once you have followed a navigation link or submitted a form, no further updates to the DOM are visually painted to the screen. So even if the class or style attributes are manipulated in a click event, for the entire time that it takes between the request and screen repainting with the new destination page, the previous page is sitting there frozen, with no updates shown to the visitor. You can watch the page in the Web Inspector, and see your updates happen to the HTML/DOM, but you won’t see any visual indication that they have changed. I see this all the time when I have a form button set to disable once clicked. In every other browser, the button will turn gray and lose its “clickability”, but Safari will resolutely show the appearance of the button in its last state, even though it is disabled, and clicking it twice does not work.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at: