Skip to content

Commit

Permalink
Fix executing commands on Android chromium browsers (#1681)
Browse files Browse the repository at this point in the history
In Chromium-based browsers on Android, when there are multiple input fields and the `enterkeyhint` attribute is not set, pressing the Enter key on the virtual keyboard will automatically switch to the next input field.

This behavior contradicts our expectation of inserting a line break.

Therefore, we need to manually set the enterkeyhint attribute to 'enter' in the input fields.

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint
  • Loading branch information
oubeichen authored Jun 7, 2024
1 parent 1e68294 commit c5a2ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Commands.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="terminal__input-wrapper">
<span v-tooltip="$t('commands-send')" class="terminal-message__sign sign-input" @click="sendCommand">></span>
<input
ref="terminal-input" type="text" spellcheck="false" :value="command" class="terminal__input"
ref="terminal-input" type="text" spellcheck="false" :value="command" enterkeyhint="enter" class="terminal__input"
@input="command = $event.target.value"
@keydown.enter="sendCommand"
@keydown.tab.prevent="autocomplete"
Expand Down

0 comments on commit c5a2ac4

Please sign in to comment.