TypeError
in input-time-zone setFocus()
#10736
Labels
0 - new
New issues that need assignment.
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.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
needs triage
Planning workflow - pending design/dev review.
Check existing issues
Actual Behavior
Encountering a consistent CI test failure where a
TypeError
is thrown when callingsetFocus()
on a<calcite-input-time-zone>
element.Expected Behavior
No
TypeError
and CI tests do not fail.Reproduction Sample
https://github.com/ArcGIS/acadia-web
Reproduction Steps
The repo is private and there isn't an easy way to repro locally.
Reproduction Version
2.13.2
Relevant Info
Interestingly, failures are not reproducible when running CI tests locally (both in browser and headless) -- possibly indicating some sort of race condition.
Our tests have a helper that waits for the component to hydrate and then calls
setFocus()
on it before filling in a value. The stack trace shows the end of that chain after callingsetFocus()
on a<calcite-input-time-zone>
element:The component's implementation forwards the
setFocus
call onto a combobox reference which does not appear to exist yet (or has gone away?). Either way, typing thecomboboxEl
property as optional would likely clear up the issue for us:calcite-design-system/packages/calcite-components/src/components/input-time-zone/input-time-zone.tsx
Lines 283 to 287 in e38e297
Regression?
No response
Priority impact
impact - p2 - want for an upcoming milestone
Impact
A workaround is to stop calling
setFocus()
on the component during tests. However, this adds the risk of no longer exercising any focus-related logic.Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: