reddit/reddit-plugin-about — pull request #14 by chromakode (2012-10-09 06:47:25+00:00)
Title: Fix 2 team page focus bugs

Fun with events!

* If a team member was focused and then focus changed to another member without closing the bubble, a `'hide'` event never fired, causing the `#about-team` element to pile up `.focusing-username` classes. You can see this by clicking kn0thing and then another avatar on the site -- the bubble corners will stay rounded.

* Clicking the 'x' close button on the details popup would trigger the `hide` function, but since it was a delegated event, it also passed an event object that was unintentionally making `isChange` truthy, causing a `'hide'` event to not fire. This meant that clicking the 'x' won't properly set the UI to the non-faded unfocused state. This is especially bad when alienth is focused, because it traps you in the darkened state and prevents from selecting any other avatars until you click on alienth again.