Fix broken interaction

This commit is contained in:
Austen Adler 2023-04-30 23:27:09 -04:00
parent d1a97bd53c
commit ba41a3b2fa
3 changed files with 7 additions and 3 deletions

View File

@ -38,7 +38,7 @@ docs-build: output-clean
rust-watch: rust-watch:
cargo watch -x fmt -x check -x build cargo watch -x fmt -x check -x build
js-dev: js-dev: wasm-build
yarn --cwd ./web-frontend/ dev yarn --cwd ./web-frontend/ dev
fmt: fmt:

View File

@ -33,7 +33,7 @@ export function createUrlStore(ssrUrl) {
window.addEventListener('hashchange', updateHref); window.addEventListener('hashchange', updateHref);
return { return {
subscribe: derived(href, ($href) => new URL($href)).subscribe, subscribe: derived(href, ($href) => new URL($href)).subscribe
}; };
} }

View File

@ -148,7 +148,11 @@
coordinateInputValue = addr.allCoordinates[selectedCoordinateType]; coordinateInputValue = addr.allCoordinates[selectedCoordinateType];
} }
history.replaceStateNoNotification(undefined, undefined, `#${addr.address.replaceAll(' ', '-')}`); history.replaceState(
undefined,
undefined,
`#${addr.address.replaceAll(' ', '-')}`
);
map.panTo(latlng, 20); map.panTo(latlng, 20);
leaflet.popup().setLatLng(latlng).setContent(`${addr.address}`).openOn(map); leaflet.popup().setLatLng(latlng).setContent(`${addr.address}`).openOn(map);