add delete support and to keyboard shortcuts

pull/21833/head
thobyv-kismat 2020-03-26 08:37:46 +01:00
parent c95b23f3ec
commit 2bd112ca7c
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ export const Key = {
PAGE_UP: "PageUp",
PAGE_DOWN: "PageDown",
BACKSPACE: "Backspace",
DELETE: "Delete",
ARROW_UP: "ArrowUp",
ARROW_DOWN: "ArrowDown",
ARROW_LEFT: "ArrowLeft",

View File

@ -447,7 +447,7 @@ export default class BasicMessageEditor extends React.Component {
} else if (event.key === Key.TAB) {
this._tabCompleteName();
handled = true;
} else if (event.key === Key.BACKSPACE) {
} else if (event.key === Key.BACKSPACE || Key.DELETE) {
this._formatBarRef.hide();
}
}