Fix for issue #520 where IE11 flashed up the modal after close#535
Open
glenatron wants to merge 1 commit intolikeastore:masterfrom
Open
Fix for issue #520 where IE11 flashed up the modal after close#535glenatron wants to merge 1 commit intolikeastore:masterfrom
glenatron wants to merge 1 commit intolikeastore:masterfrom
Conversation
… should have closed.
faceleg
requested changes
Feb 13, 2017
| $rootScope.$broadcast('ngDialog.closing', $dialog, value); | ||
| dialogsCount = dialogsCount < 0 ? 0 : dialogsCount; | ||
| if (animationEndSupport && !options.disableAnimation) { | ||
| var isIE = !!window.MSInputMethodContext && !!document.documentMode; |
Contributor
There was a problem hiding this comment.
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, |
faceleg
requested changes
Feb 13, 2017
| dialogsCount = dialogsCount < 0 ? 0 : dialogsCount; | ||
| if (animationEndSupport && !options.disableAnimation) { | ||
| var isIE = !!window.MSInputMethodContext && !!document.documentMode; | ||
| scope.$destroy(); |
Contributor
There was a problem hiding this comment.
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; |
Contributor
|
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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