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

setFocus method not working on input-date-picker and input-time-picker #9491

Closed
2 of 6 tasks
nwhittaker opened this issue Jun 1, 2024 · 3 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 2 Small fix or update, may require updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented Jun 1, 2024

Check existing issues

Actual Behavior

  1. Calling setFocus() on input-date-picker shifts focus to the picker's trigger button.
  2. Calling setFocus() on input-time-picker does not shift focus at all.
Actual date focus Actual time focus
Screenshot 2024-05-31 at 11 45 54 PM Screenshot 2024-05-31 at 11 46 26 PM

Expected Behavior

  1. Focus shifts to the date input's text field part first. This matches the focused state if the user had navigated to the input via keyboard.
  2. Focus shifts to the time input's text field part.
Expected date focus Expected time focus
Screenshot 2024-05-31 at 11 46 04 PM Screenshot 2024-05-31 at 11 46 34 PM

Reproduction Sample

https://codepen.io/nwhittaker-esri/pen/QWRppqZ

Reproduction Steps

  1. Visit the repro and click the various buttons to call setFocus() on the different input types.
  2. Compare with how focus is set on the calcite-input element.

Reproduction Version

1.9.0

Relevant Info

No response

Regression?

No response

Priority impact

impact - p2 - want for an upcoming milestone

Impact

Impact is degraded usability and accessibility to the end user -- specifically in flows where focus may need to be temporarily captured and then restored programmatically (e.g. presenting a modal).

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@nwhittaker nwhittaker added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jun 1, 2024
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone labels Jun 1, 2024
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 2 Small fix or update, may require updates to tests. and removed needs triage Planning workflow - pending design/dev review. labels Jun 10, 2024
@geospatialem geospatialem added this to the 2024-08-27 - Aug Release milestone Jun 10, 2024
@geospatialem
Copy link
Member

calling focusFirstTabbable in setFocus could be a potential fix.

@anveshmekala anveshmekala self-assigned this Jun 13, 2024
@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Jun 14, 2024
anveshmekala added a commit that referenced this issue Jun 17, 2024
…tFocus` (#9584)

**Related Issue:**
#9491

## Summary

Focuses input element on `setFocus` method.
@anveshmekala anveshmekala added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jun 17, 2024
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned anveshmekala Jun 17, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Jun 18, 2024

🍡 Verified locally on dev

@DitwanP DitwanP closed this as completed Jun 18, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 2 Small fix or update, may require updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

4 participants