mirror of https://github.com/vector-im/riot-web
Merge pull request #2923 from rosston/alt-enter-mac
Make alt-enter insert new line on macOSpull/21833/head
commit
232fd8656b
|
@ -1041,7 +1041,8 @@ export default class MessageComposerInput extends React.Component {
|
|||
};
|
||||
|
||||
handleReturn = (ev, change) => {
|
||||
if (ev.shiftKey) {
|
||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
if (ev.shiftKey || (isMac && ev.altKey)) {
|
||||
return change.insertText('\n');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue