Replace ResizeObserver by Resize event #563
Closed
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.
Why are these changes introduced?
Fixes #510
What approach did you take?
Replaced the
ResizeObserver
by aResize
event which applies to the window instead of just the slider element.Other considerations
I still need to look into the
IntersectionObserver
but when I tested on a laptop that has Safari 12.1.2 and browserstack iOS 12, I didn't get errors like I did before and language selector, cart notification, slider and product modal do work.From what I'm seeing it's just the sticky header and product recos that do not work. So product recos never show up and the header behave like a non sticky one, stays at the top of the page at all time, so you have to scroll back up to get to it.
Would this be acceptable enough ? I think it prevents us from having too many work arounds/extra code and offer a decent experience on those older browser versions.
Demo links
Checklist
Things to test
Use browserstack to test iOS 12 and the Mojave OS with version 12 for Safari.