aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-06-20 15:06:41 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-06-20 15:06:41 -0400
commit9b3e80def0be6c09c31b5176817a54323d217d81 (patch)
tree8c99922273f5992ccb2e633b7d2398f42310596d /src
parent1f24c5010a1cf6365265ea1f02327bb81a98134a (diff)
Handled more events in editable view
Diffstat (limited to 'src')
-rw-r--r--src/client/views/EditableView.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx
index 0f6281b5c..97a2d19dd 100644
--- a/src/client/views/EditableView.tsx
+++ b/src/client/views/EditableView.tsx
@@ -72,10 +72,14 @@ export class EditableView extends React.Component<EditableProps> {
e.stopPropagation();
}
+ stopPropagation(e: React.SyntheticEvent) {
+ e.stopPropagation();
+ }
+
render() {
if (this._editing) {
return <input className="editableView-input" defaultValue={this.props.GetValue()} onKeyDown={this.onKeyDown} autoFocus
- onBlur={action(() => this._editing = false)}
+ onBlur={action(() => this._editing = false)} onPointerDown={this.stopPropagation} onClick={this.stopPropagation} onPointerUp={this.stopPropagation}
style={{ display: this.props.display }} />;
} else {
return (