Skip to content

Commit

Permalink
hotfix: anchor does not work on slow internet (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlopin committed Jul 3, 2024
1 parent de79a77 commit ae34289
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/static/js/components/ReplyContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ export default {
}
}
},
mounted: function() {
if (window.location.hash) {
const anchorEl = document.getElementById(window.location.hash.substring(1))
if (anchorEl) {
window.location = window.location
anchorEl.scrollIntoView()
}
}
},
updated: function() {
if (this.replyTo !== null && this.getEditor()) {
// move the reply form under the comment
Expand Down

0 comments on commit ae34289

Please sign in to comment.