@@ -499,9 +499,6 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
499
499
handled = true ;
500
500
} else if ( event . key === Key . BACKSPACE || event . key === Key . DELETE ) {
501
501
this . formatBarRef . current . hide ( ) ;
502
- if ( ! event . ctrlKey && ! event . metaKey ) {
503
- handled = this . fakeDeletion ( event . key === Key . BACKSPACE ) ;
504
- }
505
502
}
506
503
507
504
if ( handled ) {
@@ -567,29 +564,6 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
567
564
}
568
565
} ;
569
566
570
- /**
571
- * TODO: Remove when Debian moves to newer version of Firefox
572
- * On Firefox 78 no event emitted when the user tries to delete pills.
573
- * Therefore we need to fake what would normally happen
574
- * @param direction in which to delete
575
- * @returns handled
576
- */
577
- private fakeDeletion ( backward : boolean ) : boolean {
578
- const selection = document . getSelection ( ) ;
579
- // Use the default handling for ranges
580
- if ( selection . type === "Range" ) return false ;
581
-
582
- this . modifiedFlag = true ;
583
- const { caret, text } = getCaretOffsetAndText ( this . editorRef . current , selection ) ;
584
-
585
- // Do the deletion itself
586
- if ( backward ) caret . offset -- ;
587
- const newText = text . slice ( 0 , caret . offset ) + text . slice ( caret . offset + 1 ) ;
588
-
589
- this . props . model . update ( newText , backward ? "deleteContentBackward" : "deleteContentForward" , caret ) ;
590
- return true ;
591
- }
592
-
593
567
private async tabCompleteName ( ) : Promise < void > {
594
568
try {
595
569
await new Promise < void > ( resolve => this . setState ( { showVisualBell : false } , resolve ) ) ;
0 commit comments