diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-03-26 00:02:30 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-03-26 00:02:30 -0400 |
| commit | 970ecdb7158340cec2ea9e9a381d86afa8a59430 (patch) | |
| tree | 1d9067f92f9342bd52784af8023cf82f9ab32d28 /src/client/views/nodes/FormattedTextBox.tsx | |
| parent | 2264fb874a09ee01540141986325c76650f32c21 (diff) | |
tried to fix keyboard event issue when editing a text note in an embedded free form collection.
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
| -rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 6 |
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} />) } |
