@@ -563,36 +563,42 @@ - (void)grammarCheckingDidChange:(BOOL)enabled
563563  }
564564}
565565
566- - (BOOL )hasValidKeyDownOrValidKeyUp : (nonnull NSString  *)key  {
567-   return  YES ;
568- }
569- 
570566- (void )submitOnKeyDownIfNeeded : (nonnull NSEvent  *)event  {}
571567
572568- (void )textInputDidCancel  {}
573569
574570- (NSDragOperation )textInputDraggingEntered : (nonnull id <NSDraggingInfo >)draggingInfo  {
571+   if  ([draggingInfo.draggingPasteboard availableTypeFromArray: self .registeredDraggedTypes]) {
572+     return  [self  draggingEntered: draggingInfo];
573+   }
575574  return  NSDragOperationNone;
576575}
577576
578577- (void )textInputDraggingExited : (nonnull id <NSDraggingInfo >)draggingInfo  {
579-   return ;
578+   if  ([draggingInfo.draggingPasteboard availableTypeFromArray: self .registeredDraggedTypes]) {
579+     [self  draggingExited: draggingInfo];
580+   }
580581}
581582
582- - (BOOL )textInputShouldHandleDeleteBackward : (nonnull id <RCTBackedTextInputViewProtocol>)sender  {
583+ - (BOOL )textInputShouldHandleDragOperation : (nonnull id <NSDraggingInfo >)draggingInfo  {
584+   if  ([draggingInfo.draggingPasteboard availableTypeFromArray: self .registeredDraggedTypes]) {
585+     [self  performDragOperation: draggingInfo];
586+     return  NO ;
587+   }
588+ 
583589  return  YES ;
584590}
585591
586- - (BOOL )textInputShouldHandleDeleteForward : (nonnull id <RCTBackedTextInputViewProtocol>)sender  {
592+ - (BOOL )textInputShouldHandleDeleteBackward : (nonnull id <RCTBackedTextInputViewProtocol>)sender  {
587593  return  YES ;
588594}
589595
590- - (BOOL )textInputShouldHandleDragOperation : (nonnull id <NSDraggingInfo >) draggingInfo  {
596+ - (BOOL )textInputShouldHandleDeleteForward : (nonnull id <RCTBackedTextInputViewProtocol>) sender  {
591597  return  YES ;
592598}
593599
594600- (BOOL )textInputShouldHandleKeyEvent : (nonnull NSEvent  *)event  {
595-   return  YES ;
601+   return  ![ self   handleKeyboardEvent: event] ;
596602}
597603
598604- (BOOL )textInputShouldHandlePaste : (nonnull id <RCTBackedTextInputViewProtocol>)sender  {
0 commit comments