mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
Allow default for ctrl+shift+b, ctrl+shift+u in RTE
fixes vector-im/riot-web#4750
This commit is contained in:
parent
91c96c1c27
commit
d9d8f2055f
@ -104,7 +104,11 @@ export default class MessageComposerInput extends React.Component {
|
||||
}
|
||||
|
||||
// Allow opening of dev tools. getDefaultKeyBinding would be 'italic' for KEY_I
|
||||
if (e.keyCode === KeyCode.KEY_I && e.shiftKey && e.ctrlKey) {
|
||||
// Likewise protect bold and underline (in case some browsers use these as
|
||||
// shortcuts for things).
|
||||
if ([KeyCode.KEY_B, KeyCode.KEY_I, KeyCode.KEY_U].includes(e.keyCode) &&
|
||||
e.shiftKey && e.ctrlKey
|
||||
) {
|
||||
// When null is returned, draft-js will NOT preventDefault, allowing dev tools
|
||||
// to be toggled when the editor is focussed
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user