Pressing Esc in left pane composer menu should go back

This commit is contained in:
Evan Hahn 2021-04-02 16:43:39 -05:00 committed by Josh Perez
parent 2d35fa8f57
commit f05d45ac9b
12 changed files with 168 additions and 5 deletions

View file

@ -61,7 +61,7 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<
return (
<div className="module-left-pane__header__contents">
<button
onClick={showInbox}
onClick={this.getBackAction({ showInbox })}
className="module-left-pane__header__contents__back-button"
title={i18n('backToInbox')}
aria-label={i18n('backToInbox')}
@ -74,6 +74,10 @@ export class LeftPaneComposeHelper extends LeftPaneHelper<
);
}
getBackAction({ showInbox }: { showInbox: () => void }): () => void {
return showInbox;
}
getPreRowsNode({
i18n,
onChangeComposeSearchTerm,