mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Don’t leave line selected when switching blobs
Fixes #906 Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
This commit is contained in:
@@ -63,9 +63,10 @@
|
||||
</style>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
{title}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
on:click
|
||||
class="square-button"
|
||||
class:active
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
$: content = highlighted ? lineNumbersGutter(highlighted) : undefined;
|
||||
|
||||
let selectedLineId: string | undefined = undefined;
|
||||
updateSelectedLineId();
|
||||
$: {
|
||||
content;
|
||||
updateSelectedLineId();
|
||||
}
|
||||
|
||||
function updateSelectedLineId() {
|
||||
const fragmentId = window.location.hash.substr(1);
|
||||
|
||||
Reference in New Issue
Block a user