WICG / canvas-place-element

Other
30 stars 3 forks source link

Questions about focus management #14

Open benlesh opened 2 weeks ago

benlesh commented 2 weeks ago

I'm curious about how focus/blur will be managed with this.

Will the tab index be part of the containing document? So if I'm in a button outside of the canvas, and there's a button inside of the canvas, can I tab to it?

Is there a way to tap into the focus management? Some canvas-based apps have rolled their own focus management, and will want to integrate with this new feature.

schenney-chromium commented 2 weeks ago

This may be a back compatibility issue to address of we change how the canvas grabs focus. We would not want the mere existence of the feature to break existing canvas content, even if the app never calls placeElement().

chrishtr commented 2 weeks ago

Will the tab index be part of the containing document? So if I'm in a button outside of the canvas, and there's a button inside of the canvas, can I tab to it?

Yes. This is how it already works with content under <canvas>.