Only hide hoverlink on first display of commandline

This commit is contained in:
Oliver Blanthorn 2020-06-10 17:57:41 +01:00
parent 854b0f0e93
commit 06683b2bcf
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 11 additions and 7 deletions

View file

@ -55,7 +55,7 @@ init().catch(e => {
)
})
export function show() {
export function show(hidehover = false) {
try {
/* Hide "hoverlink" pop-up which obscures command line
*
@ -63,11 +63,14 @@ export function show() {
*
* Known issue: currently scrolls the page to the bottom.
*/
const a = window.document.createElement("A")
; (a as any).href = ""
document.body.appendChild(a)
a.focus({preventScroll: true})
document.body.removeChild(a)
if (hidehover) {
const a = window.document.createElement("A")
; (a as any).href = ""
document.body.appendChild(a)
a.focus({preventScroll: true})
document.body.removeChild(a)
}
cmdline_iframe.classList.remove("hidden")
const height =

View file

@ -2912,7 +2912,8 @@ export function sleep(time_ms: number) {
/** @hidden */
//#content
export function showcmdline(focus = true) {
CommandLineContent.show()
const hidehover = true
CommandLineContent.show(hidehover)
let done = Promise.resolve()
if (focus) {
CommandLineContent.focus()