Skip to content

Commit

Permalink
fix(cicero-ui): prevent backspace at variable start - I78 (#80)
Browse files Browse the repository at this point in the history
Signed-off-by: irmerk <[email protected]>
  • Loading branch information
jolanglinais authored May 14, 2020
1 parent 6858949 commit ab48a08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,15 @@ cd packages/storybook
npm run storybook
```

### Develop inside Storybook

While Storybook is running, if you make a change in a package that you want to see reflected in the demo, in a new terminal:

```
cd packages/<PACKAGE>
npm run build
```

Storybook will reload with the applied changes.

[apdev]: https://github.com/accordproject/techdocs/blob/master/DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export const isEditableVariable = (lockText, editor, event) => {
const nextNode = Editor.next(editor, { at: editor.selection.focus.path });
// if the current focus is at the end of a node & the next node is a variable allow editing
if (nextNode && nextNode[0].type === VARIABLE && textLength === editor.selection.focus.offset) {
if (event.inputType === 'deleteContentBackward') {
return false;
}
return true;
}
return inVariable(editor);
Expand Down

0 comments on commit ab48a08

Please sign in to comment.