diff --git a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx index c4f57fedca..91c4bd59fe 100644 --- a/client/modules/IDE/components/CollectionList/CollectionListRow.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionListRow.jsx @@ -140,6 +140,7 @@ const CollectionListRowBase = (props) => { const handleRenameEnter = (e) => { if (e.key === 'Enter') { + e.preventDefault(); updateName(); closeAll(); } @@ -187,7 +188,7 @@ const CollectionListRowBase = (props) => { e.stopPropagation()} ref={renameInput} diff --git a/client/modules/IDE/components/SketchList.jsx b/client/modules/IDE/components/SketchList.jsx index 2237227766..6f8b5b513d 100644 --- a/client/modules/IDE/components/SketchList.jsx +++ b/client/modules/IDE/components/SketchList.jsx @@ -64,6 +64,7 @@ class SketchListRowBase extends React.Component { handleRenameEnter = (e) => { if (e.key === 'Enter') { + e.preventDefault(); this.updateName(); this.closeRename(); } @@ -173,7 +174,7 @@ class SketchListRowBase extends React.Component { e.stopPropagation()} ref={this.renameInput}