Hacker News new | past | comments | ask | show | jobs | submit login

Found it. In https://www.blog.google/static/blogv2/js/all.js?version=4.3

  {key:"onKeyDown",value:function(t){var e=t.preventDefault;this.isToggle(document.activeElement)?(e(),!this.header.isKebabOpen&&this.header.openKebab(),this.getFirstLink().focus()):this.isLastLink(document.activeElement)?this.isLastLink(document.activeElement)&&e():(e(),this.focusNextLink())}}
There's a logic error in the nested ternaries: event.preventDefault() is called in every branch.

Fixed:

  {key:"onKeyDown",value:function(t){var e=t.preventDefault;this.isToggle(document.activeElement)?(e(),!this.header.isKebabOpen&&this.header.openKebab(),this.getFirstLink().focus()):this.isLink(document.activeElement)&&(e(),!this.isLastLink(document.activeElement)&&this.focusNextLink())}}



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: