Page MenuHomePhabricator

Find template input should focus by default when adding a new template
Closed, ResolvedPublic1 Estimated Story Points

Description

When adding a new template the input field to search for a template should get focus. This is working when using the buttons but not, when invoking the dialog to add a template or when the template placeholder is the last page due to removal of other pages.

Event Timeline

Change 811705 had a related patch set uploaded (by Andrew-WMDE; author: Andrew-WMDE):

[mediawiki/extensions/VisualEditor@master] Autofocus template input field on dialog open

https://gerrit.wikimedia.org/r/811705

Change 811705 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Autofocus template input field on dialog open

https://gerrit.wikimedia.org/r/811705

I'm partially reverting code which implemented the last requirement in the description:

when the template placeholder is the last page due to removal of other pages.

I don't think this is a safe design, it also causes focus to be bounced around in situations which we didn't intend such as after removing a parameter.

Change 812265 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Don't refocus content pane after removals

https://gerrit.wikimedia.org/r/812265

Change 812265 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Don't refocus content pane after removals

https://gerrit.wikimedia.org/r/812265