- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 03:05 AM
Is it possible to prevent a GlideModal Window from closing when the user clicks outside of the window? Ie. I want to force the user to click within the Modal. The GlideDialogWindow natively seems to have this feature but it doesn't display as nicely and I can't pin the position of the Window centrally.
Thanks
Solved! Go to Solution.
- Labels:
-
Best Practices
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2017 02:05 PM
Hi, there is a method for that:
var modal = new GlideModal('page');
modal.setBackdropStatic(true);
However this is not documented in the doc so it could eventually becomes unsupported without warning. I consider this as a not so important feature so you could put it in a try catch to make sure it does not break anything. So if it becomes unsupported, the modal window will simply return to old behavior of closing when clicking outside of window.
var modal = new GlideModal('page');
try{
modal.setBackdropStatic(true);
}
catch(e){
console.log(e);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2020 04:35 AM