Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Jerky transition in chrome on opening/closing. #4178

@JonCognioDigital

Description

@JonCognioDigital

Has anybody else experienced this?

Basically, when I open a modal and use a css transform (scale) it's really choppy/jerky when you open and close the window, but only in chrome.

I'm using the in class and some pretty simple sass...

.modal{

    transition: all 0.3s ease-out;

    .modal-dialog{
        will-change: transform;
        opacity: 0;
        transform: scale(0.7);
        transition: all 0.3s ease-out;
    }

    &.in{
        .modal-dialog{
            opacity: 1;
            transform: scale(1);
        }
    }
}

I have to have the transition in .modal as well as .modal-dialog, otherwise angular ui doesn't wait for the animation to finish before removing the modal from the DOM.

The weird thing is that once the modal is open I can use dev tools to switch off the transform and opacity styles at will and the modal shrinks and disappears using buttery smooth transitions, but when opening and closing the modal it drops to 3 or 4 frames per second.

I'm convinced it's because something else is happening when Angular UI makes the modal and inserts it into the dom. There are loads of other ng-aminate classes added at the same time which could be causing the problem but it's weird that it doesn't happen in IE, which does pause for a second before opening the modal with a very smooth animation.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions