Merge pull request #2923 from rosston/alt-enter-mac
Make alt-enter insert new line on macOS
This commit is contained in:
commit
232fd8656b
1 changed files with 2 additions and 1 deletions
|
@ -1041,7 +1041,8 @@ export default class MessageComposerInput extends React.Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleReturn = (ev, change) => {
|
handleReturn = (ev, change) => {
|
||||||
if (ev.shiftKey) {
|
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||||
|
if (ev.shiftKey || (isMac && ev.altKey)) {
|
||||||
return change.insertText('\n');
|
return change.insertText('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue