mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Fix mention blot to enable native keyboard navigation
Co-authored-by: Chris Svenningsen <chris@carbonfive.com>
This commit is contained in:
@@ -400,26 +400,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
|
||||
return true;
|
||||
};
|
||||
|
||||
const onCtrlA = () => {
|
||||
const quill = quillRef.current;
|
||||
|
||||
if (quill === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
quill.setSelection(0, 0);
|
||||
};
|
||||
|
||||
const onCtrlE = () => {
|
||||
const quill = quillRef.current;
|
||||
|
||||
if (quill === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
quill.setSelection(quill.getLength(), 0);
|
||||
};
|
||||
|
||||
const onBackspace = () => {
|
||||
const quill = quillRef.current;
|
||||
|
||||
@@ -576,8 +556,6 @@ export const CompositionInput: React.ComponentType<Props> = props => {
|
||||
handler: onShortKeyEnter,
|
||||
},
|
||||
onEscape: { key: 27, handler: onEscape }, // 27 = Escape
|
||||
onCtrlA: { key: 65, ctrlKey: true, handler: onCtrlA }, // 65 = a
|
||||
onCtrlE: { key: 69, ctrlKey: true, handler: onCtrlE }, // 69 = e
|
||||
onBackspace: { key: 8, handler: onBackspace }, // 8 = Backspace
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user