Revision code

Changes Version 0.24.0
Released on April 07, 2016 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.openDuration
    • up.modal.config.closeDuration
    • up.modal.config.openEasing
    • up.modal.config.closeEasing
    • up.modal.config.backdropOpenAnimation
    • up.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-active classes 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-backdrop element:

    <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-index properties 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.

Upgrading

If you're upgrading from an older Unpoly version you should load unpoly-migrate.js to polyfill deprecated APIs. Changes handled by unpoly-migrate.js are not considered breaking changes.

See our upgrading guide for details.