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

Draggable Calcite Dialog steals arrow controls from children elements, PreventDefault does not work. #11438

Open
2 of 6 tasks
EH1537 opened this issue Feb 3, 2025 · 0 comments
Labels
0 - new New issues that need assignment. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone needs triage Planning workflow - pending design/dev review.

Comments

@EH1537
Copy link

EH1537 commented Feb 3, 2025

Check existing issues

Actual Behavior

By default, if the Drag Enabled is true, arrow keys used within the Dialog cause it to shift, rather than operate the controls.

String input's cursor does not work at all.

Number inputs do work with up and down arrows and cause the dialog to shift.

Suggested fix is to use PreventDefault on the events for MouseDown, this does not fix the input controls themselves.

Expected Behavior

This Arrows Move Dialog should be an opt in quality of the Drag Enabled, rather than have the consumers of Calcite update all of their inputs within the Dialog.

Reproduction Sample

https://codepen.io/eh1537/pen/pvzmygv?editors=1001

Reproduction Steps

  1. Comment out PreventDefault to see master behavior with arrow keys, despite clicking on the string input.
  2. Uncomment PreventDefault to see suggested fix (dialog no longer shifts, however controls still do not work).

Reproduction Version

Latest

Relevant Info

No response

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Impact

My team has a workaround adding StopPropagation on our dialog, but this is not something that the consumers should have to worry about. This should be an opt-in quality of the dialog.

Calcite package

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

Esri team

ArcGIS Web Analysis

@EH1537 EH1537 added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Feb 3, 2025
@github-actions github-actions bot added ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Web Analysis Issues logged by ArcGIS Web Analysis team members bug Bug reports for broken functionality. Issues should include a reproduction of the bug. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

1 participant