Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default function ($f7, reopenPopup = true) {
- if (module.hot) {
- module.hot.addStatusHandler(status => {
- if (status === 'idle') {
- const activePopup = document.querySelector('.modal-in')
- // next tick
- setTimeout(() => {
- // remove all popup backdrops if all popups are closed
- if (!document.querySelectorAll('.modal-in').length) {
- const popupBackdrop = document.querySelector('.popup-backdrop')
- if (popupBackdrop) {
- popupBackdrop.classList.remove('backdrop-in')
- }
- if (reopenPopup && activePopup.id) {
- $f7.popup.open(`#${activePopup.id}`, false)
- }
- }
- }, 0)
- }
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement