-
Notifications
You must be signed in to change notification settings - Fork 77
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
Closing a modal using built-in UI calls beforeClose
twice
#6379
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.
estimate - 8
Requires input from team, consider smaller steps.
p - medium
Issue is non core or affecting less that 60% of people using the library
Milestone
Comments
I think this is because the watcher for |
driskull
added a commit
that referenced
this issue
Aug 7, 2023
driskull
added a commit
that referenced
this issue
Aug 23, 2023
…oreClose calls (#7470) **Related Issue:** #6407 #6379 ## Summary - Add internal property `opened` to maintain open state when beforeBack is rejected and to handle initial animation. - Refactor `beforeClose` default value. - Rename internal close method name to be consistent with internal open method name - Prevent `beforeClose` from being called twice by adding an internal flag to ignore watch changes when necessary. - Tests
Installed and assigned for verification. |
Verified with |
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.
estimate - 8
Requires input from team, consider smaller steps.
p - medium
Issue is non core or affecting less that 60% of people using the library
Actual Behavior
Closing a modal via its built-in close button, the
esc
key, or clicking outside the modal invokes the modal'sbeforeClose
callback twice.Expected Behavior
Closing a modal via its built-in close button, the
esc
key, or clicking outside the modal invokes the modal'sbeforeClose
callback once.Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/QWBVvYP
Reproduction Steps
esc
key, or clicking outside the modal.beforeClose
is logged twice.Reproduction Version
1.0.3
Relevant Info
No response
Regression?
No response
Impact
The Field Maps web app has some modal's that need to confirm their closure in cases where data loss could occur. We'd like to use the
beforeClose
callback to do this, but having it called twice in some cases could introduce unintended side-effects.Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: