xcash / bootstrap-autocomplete

Bootstrap Autocomplete
MIT License
168 stars 72 forks source link

Autocomplete change is not triggered for auto-completion and IME composition iOS mobile #101

Open Voileexperiments opened 3 years ago

Voileexperiments commented 3 years ago

I can easily reproduce this in the demo page by:

  1. Use "Events in text field"
  2. Select default English keyboard
  3. Keep selecting auto-suggestion candidates in iOS mobile

Or

  1. Use "Events in text field"
  2. Select a Chinese/Japanese keyboard
  3. Type Chinese/Japanese text that involves IME composition and select them

As can be tested here, only beforeinput and input is triggered for both cases, and compositionend for the second case.

Apparently input event listener is missing among the listeners. Why? input event is supported by all modern browsers and adding it is perfectly backwards compatible.

xcash commented 3 years ago

I don't have an IOS device to test on. I'll try to fix this and then I'll ask you for a check if you don't mind @Voileexperiments

sunarium commented 3 years ago

A quick workaround that handles the IME composition

    $('<your-selector>').on('input', (e) => {
        $('<your-selector>').autoComplete('show');
    });
xcash commented 3 years ago

HI @sunarium thanks! I really need to fix this issue. Sorry for the delays guys.

Vinay9838 commented 2 years ago

No mentioned Events triggering.

$('.basicAutoSelect').on('autocomplete.freevalue',function(evt, item){ console.log(evt,item) })

console is empty .