Merge pull request #343 from prudloff-insite/anchor

Don't scroll to top of page when closing popin
This commit is contained in:
Amauri CHAMPEAUX 2019-08-28 09:40:21 +02:00 committed by GitHub
commit 4ef09977ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

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