-
Notifications
You must be signed in to change notification settings - Fork 691
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?
Conversation
… should have closed.
@@ -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; |
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
// 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Single quotes only
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Should this scope destroy not be above the isIE declaration?
else { | ||
$dialog.addClass('ngdialog-closing'); | ||
var duration = window.getComputedStyle($dialog.find(".ngdialog-content")[0]).animationDuration, | ||
dialogAnimationDuration = (0 < duration.indexOf("ms")) ? parseFloat(duration) : parseFloat(duration) * 1000; |
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.
Single quotes
I appreciate the work. I hate browser hacks. I understand this is the only way to fix this. I understand this should fix the issue for our users and will merge when you've made the above changes. Thanks! |
Issue #520 is caused by an IE bug, which Microsoft do not intend to fix. This works around that by setting a manual timeout based on the animation duration configured for the modal element.
What issue is this PR resolving? Alternatively, please describe the bugfix/enhancement this PR aims to provide
Have you provided unit tests that either prove the bugfix or cover the enhancement?
Related issues