Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4269 from ThobyV/thobyv/hide-formatBar-on-highlig…
Browse files Browse the repository at this point in the history
…ht-backspacing-message

Fix formatBar not hidden after highlight and backspacing some text
  • Loading branch information
bwindels authored Mar 26, 2020
2 parents 6d90307 + 1713006 commit 053a5a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/components/views/rooms/BasicMessageComposer.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,8 @@ export default class BasicMessageEditor extends React.Component {
} else if (event.key === Key.TAB) {
this._tabCompleteName();
handled = true;
} else if (event.key === Key.BACKSPACE || event.key === Key.DELETE) {
this._formatBarRef.hide();
}
}
if (handled) {
Expand Down

0 comments on commit 053a5a5

Please sign in to comment.