Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop scroll to top on cookies close button #115

Merged
merged 1 commit into from Aug 6, 2021
Merged

Stop scroll to top on cookies close button #115

merged 1 commit into from Aug 6, 2021

Conversation

lb-
Copy link
Member

@lb- lb- commented Aug 6, 2021

  • Ensure that when users click the 'close' button on the cookies message it does not scroll to the top
  • As the button is a link, when clicked it will go to the href='#' which will move the user to the stop
  • Prevent this action using event.preventDefault
  • Note: I only tested manually in the browser (using jquery), not by building the site locally

Screenshot of issue (note the href="#").
Screen Shot 2021-08-06 at 10 04 04 pm

* Ensure that when users click the 'close' button on the cookies message it does not scroll to the top
* As the button is a link, when clicked it will go to the `href='#'` which will move the user to the stop
* Prevent this action using event.preventDefault
* Note: I only tested manually in the browser (using jquery), not by building the site locally
@zerolab zerolab merged commit 361663c into master Aug 6, 2021
@kaedroho kaedroho deleted the lb--patch-1 branch November 2, 2021 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants