The default value of query in showSearch(query: 'one') is acting buggy in Android 8.1.0 but not in Android 9

The problem is that to clear the last element of ‘one’ i.e. ‘e’, I have to click multiple times.

The first time I click backspace it changed to ‘oneon’,

the second time - ‘oneo’,

third time - ‘one’,

forth time it stays - ‘one’

and then it works normally.

The problem is only happening in Android 8.1.0 phone but working fine Android 9 phone.