Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/addons/src/parallax.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const Parallax = React.memo(
if (!state.busy) {
state.busy = true
state.current = event.target[getScrollType(horizontal)]
requestAnimationFrame(() => {
requestAnimationFrame.call(window, () => {
state.layers.forEach(layer =>
layer.setPosition(state.space, state.current)
)
Expand All @@ -253,7 +253,7 @@ export const Parallax = React.memo(

const onResize = () => {
const update = () => state.update()
requestAnimationFrame(update)
requestAnimationFrame.call(window, update)
setTimeout(update, 150) // Some browsers don't fire on maximize!
}

Expand Down