diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-07-27 11:08:44 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-07-27 11:08:44 -0400 |
commit | c360dc0adb468ae3aaa1c2d943606993d01a5a52 (patch) | |
tree | d4bce1c4258f66e99c9d422560a17d9a051bbf6b /src/client/views/EditableView.tsx | |
parent | cc806ebbe8d48d1c5a4c3c49231a5d38d6f39943 (diff) |
fixed handling of keyboard events to avoid triggering global key events. made BoolCast default to false. fixed templating to deal with conflict between field fields and template fields
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 c66a92f48..7cabebddd 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -50,8 +50,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; @@ -61,6 +63,7 @@ export class EditableView extends React.Component<EditableProps> { this._editing = false; } } else if (e.key === "Escape") { + e.stopPropagation(); this._editing = false; } } |