Prevent scrolling to pretend link

Also remove the hash as it was ugly and served no purpose.
This commit is contained in:
Oliver Blanthorn 2020-06-10 16:54:40 +01:00
parent 17d9161e18
commit 5dd5b620a8
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -65,9 +65,9 @@ export function show() {
* Known issue: currently scrolls the page to the bottom.
*/
const a = window.document.createElement("A")
; (a as any).href = "#"
; (a as any).href = ""
document.body.appendChild(a)
a.focus()
a.focus({preventScroll: true})
document.body.removeChild(a)
const height =