Fix autofocus cursor placement
This commit is contained in:
parent
fa7857ba84
commit
de27baa769
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,11 @@
|
||||||
<script>
|
<script>
|
||||||
if (window.location.href.split('?')[1] === "nav") {
|
if (window.location.href.split('?')[1] === "nav") {
|
||||||
window.history.replaceState(null, null, window.location.pathname);
|
window.history.replaceState(null, null, window.location.pathname);
|
||||||
document.getElementById("navInput").focus();
|
const navInput = document.getElementById("navInput");
|
||||||
|
navInput.focus();
|
||||||
|
const tmp = navInput.value;
|
||||||
|
navInput.value = "";
|
||||||
|
navInput.value = tmp;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{ if not ($scratch.Get "isLatest") }}
|
{{ if not ($scratch.Get "isLatest") }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue