Problem/Motivation

When opening the settings dialog via URL (e.g. #editCookieSettings) and closing it either through clicking on the X or on any of the Accept or Deny buttons, the anchor symbol # remains in the URL, causing the page to jump to the top.

Steps to reproduce

  1. Set the URL hash to editCookieSettings for the settings dialog layer and embed it somewhere on the site
  2. Click the link to open the settings dialog
  3. Close the dialog

If it doesn't occur immediately, repeat steps 2 and 3 again.

Proposed resolution

Closing the dialog shouldn't leave the # in the URL

Issue fork cookies-3427528

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

remoschneider created an issue. See original summary.

anybody’s picture

Version: 1.2.11 » 1.2.x-dev
Priority: Normal » Minor

@remoschneider thanks for the report. Could you prepare a MR with a fix?

kewin.nammert made their first commit to this issue’s fork.

kewin.nammert’s picture

I wasn't able to able to fix this problem by myself because I don't have access to the javascript source files.

anybody’s picture

@kewin.nammert thanks - the JS can be found at https://github.com/jfeltkamp/cookiesjsr
Sadly minified. But please create an issue over there.

anybody’s picture

Version: 1.2.x-dev » 2.x-dev
Assigned: Unassigned » jfeltkamp
Status: Active » Postponed (maintainer needs more info)

@JFeltkamp is this fixed in 2.x?