Matlab ignoring uihtml autofocus attribute in 2021b
Show older comments
We have several Matlab apps that use uihtml components. In 2020b, we used the autofocus HTML attribute to control which app component was selected when the app started (and then controlled the stack order using Reorder as introduced in 2020b). We're transitioning from 2020b to 2021b and a common complaint from our users is that the autofocus attribute appears to be ignored now.
The attached zip file includes an app & html file with a simple example. When the app is opened in 2020b, the username field is selected and the user can enter text immediately. When the app is opened in 2021b, the user has to click the edit field or press the tab key before they're able to enter text.
Is there a workaround for this behavior change or a more elegant way to control an app's focus on startup?
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!