File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed
Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -518,35 +518,24 @@ const KeyCode = {
518518 }
519519 } ,
520520
521- shouldIgnoreKeyboardEvent : function shouldIgnoreKeyboardEvent (
522- e : KeyboardEvent ,
523- options ?: {
524- checkEditable ?: boolean ;
525- checkComposing ?: boolean ;
526- } ,
527- ) {
521+ isEditableTarget : function isEditableTarget ( e : KeyboardEvent ) {
528522 const target = e . target ;
529- const { checkEditable = true , checkComposing = true } = options || { } ;
530523
531524 if ( ! ( target instanceof HTMLElement ) ) {
532525 return false ;
533526 }
534527
535528 const tagName = target . tagName ;
536529 if (
537- checkEditable &&
538- ( tagName === 'INPUT' ||
539- tagName === 'TEXTAREA' ||
540- tagName === 'SELECT' ||
541- target . isContentEditable )
530+ e . isComposing ||
531+ tagName === 'INPUT' ||
532+ tagName === 'TEXTAREA' ||
533+ tagName === 'SELECT' ||
534+ target . isContentEditable
542535 ) {
543536 return true ;
544537 }
545538
546- if ( checkComposing && e . isComposing ) {
547- return true ;
548- }
549-
550539 return false ;
551540 } ,
552541} ;
You can’t perform that action at this time.
0 commit comments