Skip to content

Commit

Permalink
Fix: Input fields autoselect (#23394)
Browse files Browse the repository at this point in the history
* Fix: Input fields autoselect

* Update tgui.bundle.js

* Update tgui.bundle.js
  • Loading branch information
AyIong authored Dec 10, 2023
1 parent 05bbd46 commit fbf348f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tgui/packages/tgui/components/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export class Input extends Component {
const input = this.inputRef.current;
if (input) {
input.value = toInputValue(nextValue);
input.selectionStart = 0;
input.selectionEnd = input.value.length;
}

if (this.props.autoFocus || this.props.autoSelect) {
Expand Down
Loading

0 comments on commit fbf348f

Please sign in to comment.