aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 30fa1342e..512ad7d70 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -158,17 +158,19 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
}
})
}
-
onKeyPress(e: React.KeyboardEvent) {
e.stopPropagation();
+ // stop propagation doesn't seem to stop propagation of native keyboard events.
+ // so we set a flag on the native event that marks that the event's been handled.
+ // (e.nativeEvent as any).DASHFormattedTextBoxHandled = true;
}
render() {
return (<div className="formattedTextBox-cont"
+ onKeyDown={this.onKeyPress}
onKeyPress={this.onKeyPress}
onPointerDown={this.onPointerDown}
onContextMenu={this.specificContextMenu}
// tfs: do we need this event handler
- onKeyDown={this.onKeyPress}
onWheel={this.onPointerWheel}
ref={this._ref} />)
}