Skip to content

[2.x] Cannot navigate admin search modal with enter #4281

@dsevillamartin

Description

@dsevillamartin

Current Behavior

When pressing "Enter" in admin search modal to go to first result, I got this error in console.

Uncaught TypeError: can't access property "click", e.find(...)[0] is undefined
    selectResult SearchModal.tsx:269
    n KeyboardNavigatable.ts:87
    navigate KeyboardNavigatable.ts:161
    bindTo KeyboardNavigatable.ts:150
    oncreate SearchModal.tsx:220

Clicking the result normally works fine. Only had one item in results.

Steps to Reproduce

  1. Go to Admin
  2. Click on search modal
  3. Search something
  4. Press enter on a result
  5. Nothing happens

Expected Behavior

You go to the page

Screenshots

No response

Environment

Output of php flarum info

n/a

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions