mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Wait for focus on iframe
This actually worsens the UX as you have to click outside of the iframe to run the command a second time to show the cli successfully.
This commit is contained in:
parent
8ee8f1d1ec
commit
60b896f57c
1 changed files with 5 additions and 5 deletions
|
@ -2468,11 +2468,11 @@ export async function sleep(time_ms: number) {
|
|||
|
||||
/** @hidden */
|
||||
//#content
|
||||
export function showcmdline(focus = true) {
|
||||
CommandLineContent.show()
|
||||
export async function showcmdline(focus = true) {
|
||||
await CommandLineContent.show()
|
||||
let done = Promise.resolve()
|
||||
if (focus) {
|
||||
CommandLineContent.focus()
|
||||
await CommandLineContent.focus()
|
||||
done = Messaging.messageOwnTab("commandline_frame", "focus")
|
||||
}
|
||||
return done
|
||||
|
@ -2486,9 +2486,9 @@ export function hidecmdline() {
|
|||
|
||||
/** Set the current value of the commandline to string *with* a trailing space */
|
||||
//#content
|
||||
export function fillcmdline(...strarr: string[]) {
|
||||
export async function fillcmdline(...strarr: string[]) {
|
||||
let str = strarr.join(" ")
|
||||
showcmdline()
|
||||
await showcmdline()
|
||||
return Messaging.messageOwnTab("commandline_frame", "fillcmdline", [str])
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue