Skip to content

Commit

Permalink
Revert #2097 (#3050)
Browse files Browse the repository at this point in the history
Fixes #2293.

#2097 wrapped
the join callback in an animation frame, therefore delaying the history
push until the DOM is already patched. This causes relative file paths
to be incorrectly resolved. Because #2173 adds the animation frame to
the scroll function, this should still work as expected and at least
in my manual tests it does.
  • Loading branch information
SteffenDE committed Jan 31, 2024
1 parent 3565114 commit 3aab8ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/phoenix_live_view/live_socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ export default class LiveSocket {
DOM.findPhxSticky(document).forEach(el => newMainEl.appendChild(el))
this.outgoingMainEl.replaceWith(newMainEl)
this.outgoingMainEl = null
callback && requestAnimationFrame(() => callback(linkRef))
callback && callback(linkRef)
onDone()
})
}
Expand Down

0 comments on commit 3aab8ae

Please sign in to comment.