Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for delegatesFocus #1008

Closed
MrAntix opened this issue Aug 10, 2018 · 5 comments
Closed

support for delegatesFocus #1008

MrAntix opened this issue Aug 10, 2018 · 5 comments
Assignees

Comments

@MrAntix
Copy link
Contributor

MrAntix commented Aug 10, 2018

Stencil version:

 @stencil/[email protected]<version>

I'm submitting a:

[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
not supported

Expected behavior:

https://developers.google.com/web/fundamentals/web-components/shadowdom#focus

@ionitron-bot ionitron-bot bot added the triage label Aug 10, 2018
@ionitron-bot ionitron-bot bot removed the triage label Aug 15, 2018
@ionitron-bot ionitron-bot bot added the ionitron: stale issue This issue has not seen any activity for a long period of time label Sep 14, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 14, 2018

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.

Thank you for using Stencil!

@ionitron-bot ionitron-bot bot closed this as completed Sep 14, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 14, 2018
@ionic-team ionic-team unlocked this conversation Oct 16, 2018
@jthoms1 jthoms1 reopened this Oct 16, 2018
@jthoms1 jthoms1 removed the ionitron: stale issue This issue has not seen any activity for a long period of time label Oct 16, 2018
@jthoms1 jthoms1 self-assigned this Oct 16, 2018
@MrAntix
Copy link
Contributor Author

MrAntix commented Oct 16, 2018

I have had a look at this and it seems to be a matter of adding the flag to $attachShadow in core\host-snapshot.ts

domApi.$attachShadow(hostElm, { mode: 'open', delegatesFocus:true });

I'd like to have a crack at it if that's ok?

Just wondering how you want the API presented, the obvious suggestion ...

@Component({
  tag: 'my-component',
  delegatesFocus: true
})
export class MyComponent { }

Also testing, I wondered how I'd check the focus gets applied appropriately?

Or if I need to check this at all as that would be the responsibility of the browser or polyfill?

I can add tests that the api passes the boolean on to the $attachShadow method

@jthoms1
Copy link
Contributor

jthoms1 commented Oct 16, 2018

@adamdbradley thoughts?

@zoofadoofa
Copy link

zoofadoofa commented Apr 29, 2019

This is not really an edge case, anything that is slotting in content into shareable components will need delegatesFocus
See Demo

@adamdbradley
Copy link
Contributor

f45c919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants