@rpg-engine/long-bow 0.7.18 → 0.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26121,8 +26121,12 @@ var Chat = function Chat(_ref) {
26121
26121
  var _useState = React.useState(''),
26122
26122
  message = _useState[0],
26123
26123
  setMessage = _useState[1];
26124
+ var inputRef = React.useRef(null);
26124
26125
  React.useEffect(function () {
26126
+ var _inputRef$current;
26125
26127
  scrollChatToBottom();
26128
+ // Focus the input element when the component mounts
26129
+ (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();
26126
26130
  }, [chatMessages]);
26127
26131
  var scrollChatToBottom = function scrollChatToBottom() {
26128
26132
  var scrollingElement = document.querySelector('.chat-body');
@@ -26164,6 +26168,7 @@ var Chat = function Chat(_ref) {
26164
26168
  })), React__default.createElement(Form, {
26165
26169
  onSubmit: handleSubmit
26166
26170
  }, React__default.createElement(TextField, {
26171
+ ref: inputRef,
26167
26172
  value: message,
26168
26173
  onChange: function onChange(e) {
26169
26174
  return setMessage(e.target.value);
@@ -26173,7 +26178,6 @@ var Chat = function Chat(_ref) {
26173
26178
  onFocus: onFocus,
26174
26179
  onBlur: onBlur,
26175
26180
  onPointerDown: onFocus,
26176
- autoFocus: true,
26177
26181
  placeholder: "Type your message..."
26178
26182
  }), React__default.createElement(SendButton, {
26179
26183
  type: "submit",