Skip to content

Commit

Permalink
Add scrolltracker reset event
Browse files Browse the repository at this point in the history
- if listening, the scroll tracker will detect this event and reset scroll tracking
- see related PR: alphagov/govuk_publishing_components#3544
  • Loading branch information
andysellick committed Aug 10, 2023
1 parent 7561ae5 commit 78ede11
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/assets/javascripts/live_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@
this.$loadingBlock.textContent = ''
this.$loadingBlock.style.display = 'none'
}
// send this event to notify the scroll tracker to reset, if listening
window.GOVUK.triggerEvent(this.$form, 'dynamic-page-update')
}

LiveSearch.prototype.restoreBooleans = function restoreBooleans () {
Expand Down

0 comments on commit 78ede11

Please sign in to comment.