Don't scroll to top of page when closing popin

This commit is contained in:
Pierre Rudloff 2019-08-19 14:58:13 +02:00
parent 1030a8305c
commit 1b5aea63dc
1 changed files with 5 additions and 1 deletions

View File

@ -767,8 +767,12 @@ var tarteaucitron = {
"use strict"; "use strict";
if (document.location.hash === tarteaucitron.hashtag) { if (document.location.hash === tarteaucitron.hashtag) {
if (window.history) {
window.history.replaceState('', document.title, window.location.pathname + window.location.search);
} else {
document.location.hash = ''; document.location.hash = '';
} }
}
tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none'); tarteaucitron.userInterface.css('tarteaucitronCookiesListContainer', 'display', 'none');