Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notify div is not removed from DOM when transitionend event is not fired #55

Open
chris-armstrong opened this issue Jan 6, 2016 · 3 comments

Comments

@chris-armstrong
Copy link

I've noticed an intermittent issue where

element housing the notification message is not always removed from the DOM after it is faded out (i.e. after the opacity is set to 0). This results in the transparent notification message obscuring part of the screen, preventing it from receiving mouse clicks or touch events.

The problem seems to be this code:

                var templateElement = $compile(template)(scope);
                templateElement.bind('webkitTransitionEnd oTransitionEnd otransitionend transitionend msTransitionEnd', function(e){
                    if (e.propertyName === 'opacity' || e.currentTarget.style.opacity === 0 || 
                        (e.originalEvent && e.originalEvent.propertyName === 'opacity')){

                        templateElement.remove();

transitionend event isn't always sent by the browser - an instance may be when the transition is interrupted by another process. This means that the element may not get removed where the event isn't fired.

@chris-armstrong
Copy link
Author

Please find attached a pull request #56 that fixes this issue.

You can replicate the issue by setting a breakpoint in $scope.close = function() {... and then manually closing the element and then stepping over the following line, which suppresses the transitionend event:

templateElement.css('opacity',0).attr('data-closing','true');

@xReeQz
Copy link

xReeQz commented May 3, 2017

The issue still persists. Will the corresponding PR be merged any time soon?

@KaduAmaral
Copy link

This will be fixed some day?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants