Skip to content

Commit

Permalink
fix: shoule handle Delete key in Windows
Browse files Browse the repository at this point in the history
support both `Delete` and `Backspace` to delete a cell
  • Loading branch information
bubkoo committed Dec 13, 2019
1 parent 9c1144c commit 5499014
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/x6-example-features/src/pages/flowchart/toolbar.tsx
Expand Up @@ -105,7 +105,11 @@ export class GraphToolbar extends React.Component<
this.commands.forEach(items =>
items.forEach(item => {
if (item.shortcut) {
this.graph.bindKey(item.shortcut, item.handler)
if (item.shortcut === 'Delete') {
this.graph.bindKey(['del', 'backspace'], item.handler)
} else {
this.graph.bindKey(item.shortcut, item.handler)
}
}
}),
)
Expand Down

0 comments on commit 5499014

Please sign in to comment.