mirror of https://github.com/vector-im/riot-web
add delete support and to keyboard shortcuts
parent
c95b23f3ec
commit
2bd112ca7c
|
@ -22,6 +22,7 @@ export const Key = {
|
||||||
PAGE_UP: "PageUp",
|
PAGE_UP: "PageUp",
|
||||||
PAGE_DOWN: "PageDown",
|
PAGE_DOWN: "PageDown",
|
||||||
BACKSPACE: "Backspace",
|
BACKSPACE: "Backspace",
|
||||||
|
DELETE: "Delete",
|
||||||
ARROW_UP: "ArrowUp",
|
ARROW_UP: "ArrowUp",
|
||||||
ARROW_DOWN: "ArrowDown",
|
ARROW_DOWN: "ArrowDown",
|
||||||
ARROW_LEFT: "ArrowLeft",
|
ARROW_LEFT: "ArrowLeft",
|
||||||
|
|
|
@ -447,7 +447,7 @@ export default class BasicMessageEditor extends React.Component {
|
||||||
} else if (event.key === Key.TAB) {
|
} else if (event.key === Key.TAB) {
|
||||||
this._tabCompleteName();
|
this._tabCompleteName();
|
||||||
handled = true;
|
handled = true;
|
||||||
} else if (event.key === Key.BACKSPACE) {
|
} else if (event.key === Key.BACKSPACE || Key.DELETE) {
|
||||||
this._formatBarRef.hide();
|
this._formatBarRef.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue