mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge pull request #2923 from rosston/alt-enter-mac
Make alt-enter insert new line on macOS
This commit is contained in:
commit
232fd8656b
@ -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 New Issue
Block a user