mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 17:20:30 +08:00
web: focus on text area after opening pak menu
This commit is contained in:
parent
70e89f5e04
commit
3170dcdb57
@ -637,7 +637,7 @@
|
|||||||
<div class="text"><b>Paste text as keypress sequence<br></b><sub>Please note that PiKVM cannot switch the keyboard layout</sub></div>
|
<div class="text"><b>Paste text as keypress sequence<br></b><sub>Please note that PiKVM cannot switch the keyboard layout</sub></div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="text" style="margin-right: 20px">
|
<div class="text" style="margin-right: 20px">
|
||||||
<textarea id="hid-pak-text" placeholder="Enter your text here"></textarea>
|
<textarea id="hid-pak-text" data-focus placeholder="Enter your text here"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<table class="kv">
|
<table class="kv">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ li(id="text-dropdown" class="right")
|
|||||||
sub Please note that PiKVM cannot switch the keyboard layout
|
sub Please note that PiKVM cannot switch the keyboard layout
|
||||||
hr
|
hr
|
||||||
div(class="text" style="margin-right: 20px")
|
div(class="text" style="margin-right: 20px")
|
||||||
textarea(id="hid-pak-text" placeholder="Enter your text here")
|
textarea(id="hid-pak-text" data-focus placeholder="Enter your text here")
|
||||||
table(class="kv")
|
table(class="kv")
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
|
|||||||
@ -298,7 +298,8 @@ function __WindowManager() {
|
|||||||
|
|
||||||
el_button.classList.add("menu-button-pressed");
|
el_button.classList.add("menu-button-pressed");
|
||||||
el_menu.style.visibility = "visible";
|
el_menu.style.visibility = "visible";
|
||||||
el_menu.focus();
|
let el_focus = el_menu.querySelector("[data-focus]");
|
||||||
|
(el_focus !== null ? el_focus : el_menu).focus();
|
||||||
all_hidden &= false;
|
all_hidden &= false;
|
||||||
} else {
|
} else {
|
||||||
el_button.classList.remove("menu-button-pressed");
|
el_button.classList.remove("menu-button-pressed");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user