Dialog emits unexpected close event when removed in 2.14, uncaught error in 3.0 #10860
Closed
2 of 6 tasks
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Data Pipelines
Issues logged by ArcGIS Data Pipelines 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 - p1 - need for current milestone
User set priority impact status of p1 - need for current milestone
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Milestone
Check existing issues
Actual Behavior
In 2.14, Calcite dialog emits a close event when it is removed from the DOM. It should not emit an event in this case because the app already knows it is closing the dialog, and it causes a complication at least in our app (see impact)
In 3.0, an uncaught type error is thrown in the console but an event is not emitted:
Uncaught (in promise) TypeError: this.transitionEl is undefined
Expected Behavior
Calcite dialog does not emit an event when it is removed from the DOM, like in 2.13
Reproduction Sample
https://codepen.io/mpayson/pen/raBBxgG
Reproduction Steps
a. Note, you may need to load the codepen twice -- the first time the CDN assets can take longer than 3 seconds
Reproduction Version
2.14
Relevant Info
No response
Regression?
2.13
Priority impact
impact - p1 - need for current milestone
Impact
Our app has a guided tour UX that transitions from a modal to a popover. When this transition happens and the modal is removed, our app receives a close event, which makes it think the user closed the guided tour, and the tour unexpectedly stops
I can't think of a good work around for this. It looks like the event gets emitted after the animation completes and the dialog is removed, which makes the behavior timing-dependent. I think we would have to set a flag when the transition starts, then block the close event from closing the tour for approximately the time the animation takes to complete. Would appreciate other work around ideas though!
Calcite package
Esri team
ArcGIS Data Pipelines
The text was updated successfully, but these errors were encountered: