Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemanrubia committed Dec 25, 2024
1 parent 8244894 commit c82dfd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/hotwire_spark.js
Original file line number Diff line number Diff line change
Expand Up @@ -1551,10 +1551,10 @@ var HotwireSpark = (function () {
}
async #reloadHtml() {
log("Reload html with Turbo...");
this.#maintainScrollPosition();
this.#keepScrollPosition();
await this.#visitCurrentPage();
}
#maintainScrollPosition() {
#keepScrollPosition() {
document.addEventListener("turbo:before-render", () => {
Turbo.navigator.currentVisit.scrolled = true;
}, {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/hotwire_spark.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export class ReplaceHtmlReloader {
async #reloadHtml() {
log("Reload html with Turbo...")

this.#maintainScrollPosition()
this.#keepScrollPosition()
await this.#visitCurrentPage()
}

#maintainScrollPosition() {
#keepScrollPosition() {
document.addEventListener("turbo:before-render", () => {
Turbo.navigator.currentVisit.scrolled = true
}, { once: true })
Expand Down

0 comments on commit c82dfd1

Please sign in to comment.