fix modals' minimising-resuming-closing in some conditions
fix modals' minimising-resuming-closing in some conditions

miguelfreitas/twister-html,myleneb/twister-html,xeddmc/twister-html,slr/twister-html,majestrate/twister-html,miguelfreitas/twister-html,xeddmc/twister-html,majestrate/twister-html,slr/twister-html,myleneb/twister-html