Merge pull request #2593 from urbit/mp/soto/empty-backspace

soto: ignore backspace at cursor position 0
This commit is contained in:
ixv 2020-03-24 15:02:49 -07:00 committed by GitHub
commit a5ed4e15e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,6 +39,8 @@ export class Input extends Component {
else if ((e.key === "Backspace") && (this.props.cursor > 0)) {
store.doEdit({ del: this.props.cursor - 1});
return store.setState({ cursor: this.props.cursor - 1});
} else if (e.key === "Backspace") {
return;
}
else if (e.key.startsWith("Arrow")) {