Skip to content

Commit 2751d53

Browse files
committed
Now autofocusing the input
1 parent 7761a37 commit 2751d53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
<form method="post">
9090
<label for="cmd"><strong>Command</strong></label>
9191
<div class="form-group">
92-
<input type="text" name="cmd" id="cmd" value="<?= htmlspecialchars($_POST['cmd'], ENT_QUOTES, 'UTF-8') ?>" required>
92+
<input type="text" name="cmd" id="cmd" value="<?= htmlspecialchars($_POST['cmd'], ENT_QUOTES, 'UTF-8') ?>"
93+
onfocus="this.setSelectionRange(this.value.length,this.value.length);" autofocus required>
9394
<button type="submit">Execute</button>
9495
</div>
9596
</form>

0 commit comments

Comments
 (0)