I have bootstrap modal pop-up window. I want the background to be non-clickable. I have close button to close the modal pop-up, so the users should use only that. Clicking outside the modal pop-up window also closes the pop-up.
Problem: I’m trying to restrict it by using html-data-backdrop=”static” in the CommandLink but still not working.
Here’s the code I’m referring to.
<apex:commandLink value="" action="{!mySearch.retrieveVideo}" Rerender="apVideoTrigger" html-data-backdrop="static" oncomplete="openvideo();">
<apex:param name="pt_id" value="{!pt.eng.Id}"/> <i class="fa fa-video-camera"></i>
</apex:commandLink>
And the scripts below
function openvideo(){
j$('#apvideo').modal(); videojs('#videoPt'); }
Solution: Instead of using the backdrop static attributes in the commandLink, it should be used passed to the bootstrap window like this
j$('#apvideo').modal({backdrop:'static'});
Other attributes can be used like “keyboard:false” to prevent users closing the modal pop-up window using the ESC key.More bootstrap options can be found here: modal window options