mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Only hide hoverlink on first display of commandline
This commit is contained in:
parent
854b0f0e93
commit
06683b2bcf
2 changed files with 11 additions and 7 deletions
|
@ -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 =
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue