See if using ShadowRoot.delegatesFocus allows us to call .focus on any focusable calcite component #3626
Labels
1 - assigned
Issues that are assigned to a sprint and a team member.
research
Issues that require more in-depth research or multiple team members to resolve or make decision.
Milestone
Background
Focusable calcite components have been implementing a
setFocus
method as a recommended convention from Ionic, but theHTMLElement.focus()
method would be nicer to be able to use since it is common to all HTMLElements. This issue will explore whether usingShadowRoot.delegatesFocus
will allow any focusable calcite component to be able to rely on the built-in focus method.If this works, even though this feature isn't fully supported in all the browser versions Calcite officially supports, it is likely we'll be able to implement this in addition to keeping the
setFocus
implementation around, at least until it is no longer needed.https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus
Desired Outcome
Build a prototype example showcasing the ability to call
focus()
on a focusable calcite component usingShadowRoot.delegatesFocus
.Additional Resources
The text was updated successfully, but these errors were encountered: