Version 0.24.0
Released on with 9 commits
Compatible changes
- New function
up.modal.extract()to open a modal from an existing HTML string. up.ajax()now also accepts the URL as a first string argument.- Expanded links to modals or popups now get a pointer cursor via CSS
- New options for up.modal.config:
up.modal.config.openDurationup.modal.config.closeDurationup.modal.config.openEasingup.modal.config.closeEasingup.modal.config.backdropOpenAnimationup.modal.config.backdropCloseAnimation- Also see the breaking changes regarding modal structure below.
- Calling
up.motion.finish()without arguments will now complete all animations and transitions on the screen. - Fix a bug where
up.motion.finish()would not cancel CSS transitions that were still in progress. - Fix a bug where
.up-activeclasses where not removed from links when the destination was already preloaded.
Breaking changes
-
⚠️ Animations when opening or closing a modal now only affect the viewport around the dialog. The backdrop is animated separately. This allows animations like "zoom in", which would look strange if the backdrop would zoom in together with the dialog.
-
⚠️ The modal's HTML structure has been changed to include a
.up-modal-backdropelement:<div class="up-modal"> <div class="up-modal-backdrop"> <div class="up-modal-viewport"> <div class="up-modal-dialog"> <div class="up-modal-content"> ... </div> <div class="up-modal-close" up-close>X</div> </div> </div> </div> -
⚠️ The
z-indexproperties for modal elements have been changed. They might change again in the future. -
⚠️ The modal will now take over the document's scrollbars after the open animation has finished. In earlier versions the modal took over as soon as the animation had started.
-
⚠️ Calling
up.motion.finish()with an element will now also complete animations/transitions on children of the given element.