Skip to content

Commit 3e74d66

Browse files
asmith26martinRenoupre-commit-ci[bot]
authored
Fix pressing delete key in form from deleting entire object. (#784)
* Fix pressing delete key in form from deleting entire object. * Stop propagation of all keyboard events Co-authored-by: asmith26 <asmith26@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: martinRenou <martin.renou@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0d0ef3c commit 3e74d66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/base/src/panelview/formbuilder.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ export class ObjectPropertiesForm extends React.Component<IProps, IStates> {
151151
<div
152152
className="jpcad-property-panel"
153153
data-path={this.props.filePath ?? ''}
154+
// Prevent any key press from propagating to other elements
155+
onKeyDown={(e: React.KeyboardEvent) => {
156+
e.stopPropagation();
157+
}}
154158
>
155159
<div
156160
className="jpcad-property-outer jp-scrollbar-tiny"

0 commit comments

Comments
 (0)