Popup-Modal not closing on Safari/Windows #8824
Merged
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.
This pull request is a fix for issue: #8761
The first thing I noticed when looking into the css was that the
-webkit-transition-duration
was missing. Therefore, the transition event was never triggered in Safari. The modal directly popped up on clicking the remove item button in the shopping cart.After adding the transition duration, Safari did no longer show the modal at all. This was because the visibility transition acts on the parent, while the transition is set on its child. I divided the animation into a visibility transition at the parent
.modal-slide, .modal-popup
and a transform transition at its child.modal-inner-wrap
. As a result, Safari users can now remove items from cart without the need to refresh a greyed out page.While debugging I replicated the issue in JSFiddle:
http://jsfiddle.net/muL7Lpnx/
And wrote the following fix:
http://jsfiddle.net/muL7Lpnx/1/
After updating the Magento Less source files, I successfully tested the fix in the following browsers:
Safari 5.1.7
Chrome 56
IE 11
Microsoft Edge 38
Firefox 50.1.0
Opera 43