diff options
author | Fawn <fangrui_tong@brown.edu> | 2019-07-27 17:19:00 -0400 |
---|---|---|
committer | Fawn <fangrui_tong@brown.edu> | 2019-07-27 17:19:00 -0400 |
commit | f02e8416239b612f40dd2c65d6ca9173e81fb1a9 (patch) | |
tree | 6541914e8d71f7dd57e66ed7fbc7679820d7594b /src/client/views/EditableView.tsx | |
parent | 905d77804bf9a810822e5e43f0cd06019aef7620 (diff) | |
parent | 606e87ccd9c06c83114d5962382cd76def86f103 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into schema_view_improvements_2
Diffstat (limited to 'src/client/views/EditableView.tsx')
-rw-r--r-- | src/client/views/EditableView.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 31e4557be..373b63282 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -69,8 +69,10 @@ export class EditableView extends React.Component<EditableProps> { @action onKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => { if (e.key === "Tab") { + e.stopPropagation(); this.props.OnTab && this.props.OnTab(); } else if (e.key === "Enter") { + e.stopPropagation(); if (!e.ctrlKey) { if (this.props.SetValue(e.currentTarget.value, e.shiftKey)) { this._editing = false; @@ -82,6 +84,7 @@ export class EditableView extends React.Component<EditableProps> { this.props.isEditingCallback && this.props.isEditingCallback(false); } } else if (e.key === "Escape") { + e.stopPropagation(); this._editing = false; this.props.isEditingCallback && this.props.isEditingCallback(false); } |