Skip to content

manual autofocus of command pallet input to prevent scroll to bottom of page, fixes #631

Warren Gifford requested to merge vo/fix-command-palette into master

Created by: vanesa

This fixes #631 (closed), where opening the command pallet scrolled the page to the bottom. This was caused by setting the autofocus attribute on the input element. The input was not yet rendered into the DOM because of being inside a popover, which lead to the unintended scroll.

Solution

Manually focus the rendered input element after the popover has opened.

Merge request reports

Loading