Friday, May 21st, 2010

afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
(Or: when your focus listener interferes with your click listener) Demo.

Stumbled across it while I was working on the new update page, and it held me up a while. Eventually, I decided to use another approach.

Playing with the thought of submitting it as a bug, but it may be expected quirky behavior -- at least, it behaves the same way in both Firefox and Opera. Chrome, meanwhile, does not suffer from the problem, but that may be sheer accident: Chrome doesn't trigger the focus event when you use the mouse, only when you use the keyboard. So in Firefox/Opera, the click event doesn't work; in Chrome, it's the focus event that doesn't show up.

Browsers: they are strange animals.

PS. If you edit the URL to see previous versions of the fiddle, you'll see that I originally thought that the presence of images had something to do with it, ehehe.