Skip to content

Commit

Permalink
hotfix: anchor does not work on slow internet
Browse files Browse the repository at this point in the history
  • Loading branch information
nlopin committed Jul 3, 2024
1 parent de79a77 commit c0defbb
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 c0defbb

Please sign in to comment.