-
Notifications
You must be signed in to change notification settings - Fork 76
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() not working on several components in newer Chrome versions #10394
Comments
Also affects Fixed by adding |
input-date-picker is affected too: In Chrome 119 clicking on the In Chrome 128 that does not happen. That causes an E2E test failure because this click no longer moves focus to the first input: Line 230 in 42c1329
My workaround thus was to update the test per new behavior: - await input.click();
+ const toggleIcon = await input.find(`>>> .${CSS.toggleIcon}`);
+ await toggleIcon.click(); However, a different solution is required if you want to preserve the Chrome 119 behavior. |
Also affecting calcite-inline-editable - that component by default tries to do Calling In general, it appears that |
Also affects calcite-design-system/packages/calcite-components/src/components/menu/menu.e2e.ts Lines 21 to 25 in aef57dd
Fixed by adding delegatesFocus to |
We should revisit our findings, but based on our earlier exploration on |
Make minor adjustments to Calcite code to have post-migration tests pass. Changes that need to be done post-migration are encoded in the following codemod files in the arcgis-web-components repository: - /packages/support-packages/stencil-to-lit/src/code/fileSpecific.ts - /packages/support-packages/stencil-to-lit/src/component/fileSpecific.ts At this point, I am finishing up the failing tests in the S components and will be pretty much done with all A-S component (with exception of #10394 and #10495)
Installed and assigned for verification. |
Verified in |
Check existing issues
Actual Behavior
Calling .setFocus() on calcite-action-group has no effect.
Expected Behavior
If .setFocus() method on the calcite-action-group element is called, I am expecting the focus to move to first focusable element.
Reproduction Sample
https://codepen.io/maxpatiiuk/pen/wvVBQXw?editors=1010
Reproduction Steps
Reproduction Version
2.13
Relevant Info
The codepen works like expected in Chrome 119. Does not work in Chrome 128.
Calcite has E2E test for setFocus in calcite-action-group. Since Stencil's Puppeteer is using Chrome 119, the test is passing. Upon updating Chrome to 129, the test is failing:
calcite-design-system/packages/calcite-components/src/components/action-group/action-group.e2e.ts
Line 58 in f50c170
Another example:
Possible solution:
Setting
delegatesFocus: true
for calcite-action element seems to fix this issue.You already have it on calcite-action-group, but might need to add it to calcite-action too:
calcite-design-system/packages/calcite-components/src/components/action-group/action-group.tsx
Lines 38 to 40 in f50c170
Regression?
No response
Priority impact
impact - p3 - not time sensitive
Impact
No response
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: