Merge commit '0af2c4829ff86cf84ed9e7804d023f31e805542b' into glitch-soc/merge-upstream

Conflicts:
- `vite.config.mts`:
  Conflict because of differently-named theme plugins.
  Updated to go with upstream's changes.
This commit is contained in:
Claire committed 2025-07-23 12:08:59 +02:00
commit 45d79427c4
26 files changed
+873 -265

No files matched your search

@@ -92,10 +92,29 @@ class ComposeForm extends ImmutablePureComponent {
this.props.onChange(e.target.value);
};
handleKeyDown = (e) => {
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
this.handleSubmit();
blurOnEscape = (e) => {
if (['esc', 'escape'].includes(e.key.toLowerCase())) {
e.target.blur();
}
}
handleKeyDownPost = (e) => {
if (e.key.toLowerCase() === 'enter' && (e.ctrlKey || e.metaKey)) {
this.handleSubmit();
}
this.blurOnEscape(e);
};
handleKeyDownSpoiler = (e) => {
if (e.key.toLowerCase() === 'enter') {
if (e.ctrlKey || e.metaKey) {
this.handleSubmit();
} else {
e.preventDefault();
this.textareaRef.current?.focus();
}
}
this.blurOnEscape(e);
};
getFulltextForCharacterCounting = () => {
@@ -248,7 +267,7 @@ class ComposeForm extends ImmutablePureComponent {
value={this.props.spoilerText}
disabled={isSubmitting}
onChange={this.handleChangeSpoilerText}
onKeyDown={this.handleKeyDown}
onKeyDown={this.handleKeyDownSpoiler}
ref={this.setSpoilerText}
suggestions={this.props.suggestions}
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
@@ -273,7 +292,7 @@ class ComposeForm extends ImmutablePureComponent {
onChange={this.handleChange}
suggestions={this.props.suggestions}
onFocus={this.handleFocus}
onKeyDown={this.handleKeyDown}
onKeyDown={this.handleKeyDownPost}
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested}
onSuggestionsClearRequested={this.onSuggestionsClearRequested}
onSuggestionSelected={this.onSuggestionSelected}