Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Preventing closure of APEX 5 Dialog pages using escape key - closeOnEscape

Daljit RJan 10 2019 — edited Jan 10 2019

Hi,

I'm utilising a series of (chained) APEX 5 Dialog pages to create a 'wizard' (process train) for a user to perform a (business) process/task.

I often remove the default 'X' close option from the dialog pages as I prefer to control/encourage the flow between dialog pages and the rest of the application. I remove the 'X' currently button the approach in the linked thread below:

However using this method I have noticed that dialog pages can still be closed by pressing the 'Escape' key. How can I disable this escape key close behaviour so that only the buttons provided (by me) on the dialog pages control the close/cancel behaviour. I believe this is controlled by the closeOnEscape property/option but I do not know how to integrate this approach with setting the closeOnEscape property/option to false. I know some advise against doing this but I think it is in someways worse to have the 'X' hidden and then still be able to close using the escape key anyway. If I set my dialog page(s) Dialog Attributes as follows:

closeOnEscape: false, open:function(event,ui){ parent.$('.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-icon-only.ui-dialog-titlebar-close').hide(); }

This does result in the 'X' being hidden but pressing the escape key still closes the dialog page.

Does anybody know or have any ideas on how to correctly set closeOnEscape to be false with APEX 5 dialogs?

Thanks,

Daljit

Environment details:

  • APEX 5.0.4.00.12
  • Oracle 11g (11.2.0.1), CentOS 5
  • ORDS 3 - Tomcat 7
  • Internet Explorer 11 (Windows 7)
  • Universal Theme
Comments
Post Details
Added on Jan 10 2019
2 comments
1,443 views