Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(searchBox): autofocus input when modal opens #121

Merged
merged 1 commit into from
May 11, 2020

Commits on May 11, 2020

  1. Update SearchBox.js

    Since we switched from React to Preact, the app lost the "autofocus" feature on the input when the modal opens.
    
    This happens because [Preact follows the HTML spec](preactjs/preact#1255 (comment)) of triggering the autofocus on page load, and not when the component mounts. React is more "aggressive" on this behavior.
    
    This therefore gets rid of the `autoFocus` prop which is ignored here, and focuses the input with an effect.
    
    Closes #119.
    francoischalifour committed May 11, 2020
    Configuration menu
    Copy the full SHA
    6565c7a View commit details
    Browse the repository at this point in the history