Fix anchor links dropping query parameter

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2024-09-01 15:02:29 +02:00
parent 28c01f4a6b
commit 60325bba49
2 changed files with 2 additions and 2 deletions

View file

@ -847,7 +847,7 @@ const anchorForId = id => {
const anchor = document.createElement('a') const anchor = document.createElement('a')
anchor.ariaHidden = 'true' anchor.ariaHidden = 'true'
anchor.className = 'anchor hidden-xs' anchor.className = 'anchor hidden-xs'
anchor.href = new URL(`#${id}`, document.location).toString() anchor.href = new URL(`${document.location.search}#${id}`, document.location).toString()
anchor.innerHTML = '<i class="fa fa-link"></i>' anchor.innerHTML = '<i class="fa fa-link"></i>'
anchor.title = id anchor.title = id
return anchor return anchor

View file

@ -1087,7 +1087,7 @@ function changeMode (type) {
} }
if (appState.currentMode !== modeType.edit) { if (appState.currentMode !== modeType.edit) {
$(document.body).css('background-color', 'white') $(document.body).css('background-color', 'white')
updateView() refreshView()
} else { } else {
$(document.body).css( $(document.body).css(
'background-color', 'background-color',