mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

Changing focus from the search box causes top result to not work #8304

Open LeoMcA opened 1 year ago

LeoMcA commented 1 year ago

Summary

Using tab to change focus from the search box (which could happen relatively often if one assumes [like me] that's how to select one of the results), then shift tab to go back causes the top result to be nonfunctional.

URL

https://developer.mozilla.org/

Reproduction steps

  1. Click on the input box
  2. Type a query
  3. Press Tab to change focus to the cancel button
  4. Press Shift + Tab to change focus back to the input
  5. Press Down to highlight the first result
  6. Press Return to navigate to it - nothing happens
  7. Click on the result - nothing happens

Expected behavior

Hitting return or clicking on the top result causes it to open.

Actual behavior

Nothing happens.

Device

Desktop

Browser

Firefox

Browser version

Pre-release (e.g. Beta, Nightly or Canary)

Operating system

Linux

Screenshot

No response

Anything else?

https://github.com/mdn/yari/pull/7979#issuecomment-1438155090

Validations

kemilbeltre commented 1 year ago

Hi @LeoMcA, I'm probably missing something, but why press Return and not Enter to navigate to the highlighted result? Thanks

kemilbeltre commented 1 year ago

Hi @LeoMcA, I'm probably missing something, but why press Return and not Enter to navigate to the highlighted result? Thanks

These keys are different and I think you need to use shift + Return or ctrl + Return to confirm.

caugner commented 2 months ago

@LeoMcA I cannot reproduce this issue, could you please check if you can?

PS: I have already experienced a different quick search issue, wherein the quick search no longer shows any results when going back to an MDN tab after some time, see: https://github.com/mdn/yari/issues/11181