For `focused` fields in widgets, also auto-select current text where possible
Address review comments
Merge pull request #3355 from ussuri/autofocus-with-autoselect

For `focused` elements in widgets, also auto-select current text where possible