Skip to content

Commit

Permalink
fix(editor): remove line in next index
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Oct 26, 2021
1 parent 8432065 commit 2c19f63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/editor/entity/EditorEntityShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@
// delete in empty raw or convert
if (
(e.key === 'Delete' || e.key === 'Backspace') &&
_input.selectionStart === 0
_input.selectionStart === 0 &&
_input.selectionEnd === 0
) {
e.preventDefault()
e.stopPropagation()
Expand Down
2 changes: 1 addition & 1 deletion src/use/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const useEntity = () => {
}

const onDeleteRaw = async (payload: any) => {
if (payload.index <= 1) return
if (payload.index <= 0) return

if (utils().isFixed(payload.index - 1)) return

Expand Down

0 comments on commit 2c19f63

Please sign in to comment.