Most application designs call for modal dialogs to remain displayed until the end user either accepts or cancels them. When you create such a window, you must ensure that the end user is only allowed to close it in response to the desired events.
By default, setting the Modal property to Yes prevents end users from navigating out of the window with the mouse, but does not prevent them from navigating to another window by pressing keys such as [Next Item] (Tab) or [Next Block]. When end users are allowed to use keys to navigate to another window, Oracle Forms always closes the modal window, unless the target window is itself a modal window. (Note that the Hide on Exit property is ignored for a modal window.)
If you navigate to a new modal window, the old modal window stays up. However, trying to navigate from a modal window to a different modal window which was already up causes the current window to be hidden.
When you implement a modal dialog, usually you want to prevent the end user from navigating out of the window with navigation keys; you want the dialog to be closed only in response to specific events, such as the end user pressing an OK or Cancel button.
You can defeat keyboard navigation out of a modal dialog in several ways:
Once you have prevented end users from closing a dialog through keyboard navigation, you must write the commands to close the dialog in response to the desired events. You can close a modal dialog programmatically by navigating to an item or block in a modeless window with Built-ins such as GO_ITEM and GO_BLOCK. For example, a modal window might contain an OK button with a When-Button-Pressed trigger that executes a GO_BLOCK statement to navigate out of the modal window.