GoogleChrome/devsummit — pull request #1 by akenn (2014-11-19 23:23:50+00:00)
Title: Ensure onCollapseButtonClick is only called on target Card

Currently if you open up the Sessions card, click on a speaker, then hit the escape key, you're stuck on the Sessions view. This is because `onCollapseButtonClick` will fire on both the Speaker card and the Sessions card, meaning that the browser will navigate up two directories to the homepage (i.e. `/devsummit/sessions/making-web-apps-appy/` -> `/devsummit/`) but leave the Sessions card open. At this point, the user will not be able to navigate back to the homepage since `this.expanded_` has been set to false on the Speaker card even though it's still visible.

This PR fixes this issue by assigning an `id` to each card equal to the card's `href` attribute (this is already being done internally in the `cards` object inside of `components/cards.js`). When `onKeyUp_` is triggered, a check is made to see if the current url is equal to the card we're trying to collapse's `id`. If it is not, the event is ignored.