Form promise remains pending when overlay is dismissed
Summary
When a form overlay is dismissed without using the form's Cancel button, the Promise returned by showForm() remains pending and does not reject as intended.
To trigger this issue, ways of closing a form without using Cancel include:
- The X button in the top right of the overlay
- Pressing the Escape key
- Clicking outside of the overlay (see image)
This prevents consumers from handling the form cancellation when the overlay is closed through other means, since showForm()'s promise never resolves or rejects.
Expected vs Current Behavior
Expected: Dismissing the form overlay without using the cancel button should reject the Promise returned by showForm().
Current: The Promise remains pending when the overlay is dismissed without clicking the Cancel button.
Steps to Reproduce
- To mimic a consumer, edit EditPropertiesAction.js onCancel to console log:
// EditPropertiesAction.js
_onCancel() {
console.log("CANCELLED");
}- Start and navigate to Open MCT
- Right click "My Items", and then click "Edit Properties"
- Click the Cancel button, observe "CANCELLED" was logged in console
- Edit properties, and click the X button. Observe "CANCELLED" was NOT logged in the console, indicating that the promise was never rejected.
Environment
- Open MCT Version: v4.3.1
- Deployment Type: npm dev
- OS: Windows 10
- Browser: Google Chrome Version 154.0.8037.58 (64-bit)
Impact Check List
- Data loss or misrepresented data?
- Regression? Did this used to work or has it always been broken?
- Is there a workaround available?
- Does this impact a critical component?
- Is this just a visual bug with no functional impact?
- Does this block the execution of e2e tests?
- Does this have an impact on Performance?
Additional Information
Clicking Cancel button (Green): Works and rejects promise, "CANCELLED" logs Clicking X or outside of overlay (Red): Promise remains pending, "CANCELLED" does not log
Source: nasa/openmct