Refactor input-date-picker connectFocusTrap config options #10899
Labels
0 - new
New issues that need assignment.
calcite-components
Issues specific to the @esri/calcite-components package.
needs triage
Planning workflow - pending design/dev review.
refactor
Issues tied to code that needs to be significantly reworked.
Description
Refactor
connectFocusTrap
config options to use callbacks to return focus based on whether it was closed via keyboard vs mouse. This change was made to avoid clicking on a separate, external element and having focus jump back to theinput-date-picker
.0d9ddc9#diff-4d4cdb442e767292afec664b7753872b8065094a8ddb8c19226d68126e156fa6R906
In the keyboard case, it will always fire on the element vs clicks.
After this refactor when
focusTrap
is enabled, it will take care of focus to return to text input when date picker is closed with escape. Refactor escapekeyDownHandler
to only close with escape whenfocusTrapDisabled
is true.https://github.com/Esri/calcite-design-system/pull/10578/files#diff-42c23e5a429472ae2ecb636c2ba383162681d40c5ff70c3f89be55d376052e32R799
Proposed Advantages
Use of
focusTrap
util fully as intended and not have redundant component logic.Which Component
input-date-picker
Relevant Info
No response
Calcite package
The text was updated successfully, but these errors were encountered: