simularium / simularium-website

Front end website for the Simularium project, includes the Simularium viewer
https://simularium.allencell.org
Apache License 2.0
6 stars 3 forks source link

Automatically focus in input box when "Load by URL" modal opens #322

Closed schoinh closed 1 year ago

schoinh commented 2 years ago

Use Case

As a Simularium user, it would be more convenient/less annoying if my cursor automatically focused in the input box when the "Load by URL" modal opens. Currently, I have to click in the text input box to focus before I can paste my URL.

Acceptance Criteria

When the user clicks on the "Load Model -> From a URL" menu item to open the Load by URL modal, they can hit ctrl/cmd + V immediately afterwards to paste a URL into the text input box, without having to click inside the input box to focus the cursor first.

Details

There is an autofocus prop that can be added to an Antd Input component that should work, but it doesn't. That might be a bug with Antd.

frasercl commented 1 year ago

Resolved by #373