aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-08-18 17:52:47 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-08-18 17:52:47 -0400
commit6195c535912cf14934db014e099244a3a8705641 (patch)
tree7f02674ef2988c625a3a37e44f6a721fc924224b /src/client/views/nodes/formattedText
parent79b1be0e8904cd6e7e1591b333e81b503f8ca41e (diff)
parent20e01fb998df7dafcf070282d822c6e87df20129 (diff)
Merge branch 'master' into sophie-ai-images
Diffstat (limited to 'src/client/views/nodes/formattedText')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index daf8719eb..2562c48e4 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -157,7 +157,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
return this.dataDoc?.mediaState === 'recording';
}
set _recording(value) {
- !this.dataDoc.recordingSource && (this.dataDoc.mediaState = value ? 'recording' : undefined);
+ !this.dataDoc[`${this.fieldKey}_recordingSource`] && (this.dataDoc.mediaState = value ? 'recording' : undefined);
}
@computed get config() {
this._keymap = buildKeymap(schema, this.props);
@@ -1259,9 +1259,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
() => this._recording,
() => {
this.stopDictation(true);
- if (this._recording) {
- this.recordDictation();
- }
+ this._recording && this.recordDictation();
}
);
if (this._recording) setTimeout(this.recordDictation);