Closed cellio closed 1 month ago
Straight after recommending making this change in Co-Design instead, I've just seen Art's comment on the issue this pull request fixes:
Probably better to do this in QPixel. Makes more sense for an application-specific use case than doing it as part of the design framework.
This is a good point, and making a special case in the design framework is a little messy. Maybe it's better to keep this in QPixel for now, and avoid changing Co-Design until #1432 is worked on (which is unlikely to be soon as it seems low priority). At that point there would be no special case in Co-Design, as the browser would handle the autofocus automatically with no JS required.
Fixes https://github.com/codidact/qpixel/issues/829 by implementing Taeir's suggestion. (Art approved the approach in the comments there.)