Three types of pop-up boxes in 1,framework7
(1) modal frame (modal): The default click on the external area does not close the pop-up box
The Modal box includes: Alert box (alert), Confirmation box (Confirm), prompt box requiring user input (Prompt)
(2) Action sheet (action Sheet): The default click External area will automatically close
(3) pop-up layer (popup): The default click External area will automatically close
2, modify the default shutdown mode
The modal box will also be closed if you want to click the external area of the modal box (modal). Or do not allow clicking on the action Sheet (action), pop-up (popup) external area will automatically close.
We can make the following modifications when FRAMEWORK7 is initialized.
Initialize App
var myApp = new Framework7 ({
Modalclosebyoutside:true,
Actionsclosebyoutside:false,
Popupclosebyoutside:false
});
3, parameter description
(1) Modalclosebyoutside: Modal box (modal) is allowed to be closed by clicking externally (default value: false)
(2) Actionsclosebyoutside: Operation table (Action Sheet) is allowed to be closed by clicking externally (default value: TRUE)
(3) Popupclosebyoutside: Pop-up Layer (popup) is allowed to be closed by clicking outside (default value: TRUE)