-
Notifications
You must be signed in to change notification settings - Fork 688
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
Fix for issue #520 where IE11 flashed up the modal after close #535
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,10 +170,22 @@ | |
$rootScope.$broadcast('ngDialog.closing', $dialog, value); | ||
dialogsCount = dialogsCount < 0 ? 0 : dialogsCount; | ||
if (animationEndSupport && !options.disableAnimation) { | ||
var isIE = !!window.MSInputMethodContext && !!document.documentMode; | ||
scope.$destroy(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this scope destroy not be above the isIE declaration? |
||
$dialog.unbind(animationEndEvent).bind(animationEndEvent, function () { | ||
privateMethods.closeDialogElement($dialog, value); | ||
}).addClass('ngdialog-closing'); | ||
if (!isIE) { | ||
$dialog.unbind(animationEndEvent).bind(animationEndEvent, function () { | ||
privateMethods.closeDialogElement($dialog, value); | ||
}).addClass('ngdialog-closing'); | ||
} | ||
// Awful IE detection due to https://connect.microsoft.com/IE/feedbackdetail/view/1605631/animation-end-events-firing-late | ||
else { | ||
$dialog.addClass('ngdialog-closing'); | ||
var duration = window.getComputedStyle($dialog.find(".ngdialog-content")[0]).animationDuration, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Single quotes only |
||
dialogAnimationDuration = (0 < duration.indexOf("ms")) ? parseFloat(duration) : parseFloat(duration) * 1000; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Single quotes |
||
setTimeout(function () { | ||
privateMethods.closeDialogElement($dialog, value); | ||
}, dialogAnimationDuration); | ||
} | ||
} else { | ||
scope.$destroy(); | ||
privateMethods.closeDialogElement($dialog, value); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting needs to match existing code