@@ -606,6 +606,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormInputElement
606
606
} )
607
607
valueStateMessage ! : Array < HTMLElement > ;
608
608
609
+ _isComposing : boolean ;
609
610
hasSuggestionItemSelected : boolean ;
610
611
valueBeforeItemSelection : string ;
611
612
valueBeforeSelectionStart : string ;
@@ -702,6 +703,9 @@ class Input extends UI5Element implements SuggestionComponent, IFormInputElement
702
703
this . _keepInnerValue = false ;
703
704
this . _focusedAfterClear = false ;
704
705
this . _valueStateLinks = [ ] ;
706
+
707
+ // Used to track if the user is composing text.
708
+ this . _isComposing = false ;
705
709
}
706
710
707
711
onEnterDOM ( ) {
@@ -715,6 +719,14 @@ class Input extends UI5Element implements SuggestionComponent, IFormInputElement
715
719
this . _removeLinksEventListeners ( ) ;
716
720
}
717
721
722
+ _onCompositionStart ( ) {
723
+ this . _isComposing = true ;
724
+ }
725
+
726
+ _onCompositionEnd ( ) {
727
+ this . _isComposing = false ;
728
+ }
729
+
718
730
_highlightSuggestionItem ( item : SuggestionItem ) {
719
731
item . markupText = this . typedInValue ? this . Suggestions ?. hightlightInput ( ( item . text || "" ) , this . typedInValue ) : encodeXML ( item . text || "" ) ;
720
732
}
@@ -773,7 +785,7 @@ class Input extends UI5Element implements SuggestionComponent, IFormInputElement
773
785
774
786
// Typehead causes issues on Android devices, so we disable it for now
775
787
// If there is already a selection the autocomplete has already been performed
776
- if ( this . _shouldAutocomplete && ! isAndroid ( ) && ! autoCompletedChars && ! this . _isKeyNavigation ) {
788
+ if ( this . _shouldAutocomplete && ! isAndroid ( ) && ! autoCompletedChars && ! this . _isKeyNavigation && ! this . _isComposing ) {
777
789
const item = this . _getFirstMatchingItem ( value ) ;
778
790
if ( item ) {
779
791
this . _handleTypeAhead ( item ) ;
0 commit comments