mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-22 19:04:02 -05:00
Fix closing the help dialog not changing the URL
This commit is contained in:
@@ -170,6 +170,18 @@ preGameHelpButton.addEventListener('click', e => {
|
||||
setUrl('help');
|
||||
});
|
||||
|
||||
helpDialog.addEventListener('close', () => {
|
||||
if (canPushState) {
|
||||
try {
|
||||
history.pushState(null, '', '.');
|
||||
} catch {
|
||||
canPushState = false;
|
||||
}
|
||||
}
|
||||
if (location.hash)
|
||||
location.hash = '';
|
||||
});
|
||||
|
||||
preGameReplayButton.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user