In many Domino Leap applications, forms are opened in a separate browser window or tab from the main application page. Currently, stage actions like the "Cancel" button can clear the form or navigate to another page but do not provide an option to close the window directly. To achieve this, users must build custom workarounds or create separate App Pages with embedded scripts. Adding native support for closing the window (for example, by allowing configuration of a "Close Window" action in stage workflows or button settings) would simplify development, improve user experience, and reduce the need for external customizations.
Why would it be useful?
It enables a cleaner and more intuitive user experience for applications that open forms in separate windows. Users can easily close the form window without workarounds, making the application feel more integrated. Developers would save time by not having to implement manual scripts or custom pages to achieve this behavior.
Who would benefit from it?
Application designers and developers building Leap apps that open forms in new windows.
End users, who would experience smoother navigation without redundant windows remaining open.
Administrators, as it reduces the need for maintenance of workaround solutions.
How should it work?
Extend the configuration options for stage actions and button events to include a new option such as "Close current window". When selected, this action should trigger window.close()
on the client side, allowing the window to close immediately, assuming the browser allows it (e.g., if the window was opened via script). This provides a native, no-code way to handle window closure in Leap workflows.