Ngx-bootstrap: fix(typeahead): Typeahead with typeaheadMinLength 0 and placeholder requires two clicks for selecting an item in IE

Created on 28 Nov 2017  路  10Comments  路  Source: valor-software/ngx-bootstrap

Bug description or feature request:

When using a typeahead with default values (typeaheadMinLength=0) IE will not let you choose an item without clicking twice

Plunker/StackBlitz that reproduces the issue:

Can be recreated in IE11 with the "Reactive forms"-example on
https://valor-software.com/ngx-bootstrap/#/typeahead
Click inside the input field and click on one of the items that shows (don't type anything). The first click gets ignored, the second click chooses the item.

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: v2.0.0-beta.8

Angular: Same as demo-page

Bootstrap: 4

Best regards,
Anders Winther-Dahl

comp(typeahead) medium (days) issue

Most helpful comment

How can ngx-bootstrap team underestimate this issue. It is really a big and clear issue?

All 10 comments

For me, the first click on a typeahead with typeaheadMinLength=0 on IE11 simply does not make the HTTP call whatsoever.

But yes, I too can confirm that there is issues with typeahead behavior and IE11.

I'm using a temporary fix to get around this:
Add a blank space in the model then trim the model..

if (document.documentMode) { this.model+= " "; this.model.trim(); }

This bug is crucial for our project. Is there an ETA for this? Or the typeahead fixes in general. Or even better: A temporary workaround? I don't know how to apply the workaround by @snimelius . We are using reactive forms btw.

Greetings!

Still doesn't work, please look into this. It's also important for our project.

For me, the first click on a typeahead with typeahead MinLength=0 on IE11 is working but when i am changing the value second time, typeahead list is not getting hided on one click need to click twice and after that list is not getting opened on focus when typeahead field is empty.

Noticed same issue, where it needs two clicks to select in IE11 when minlength=0.

Has anyone found a workaround?

@scotteby The workaround is to place a space character in the input if the browser is IE. It's hideous and a little bothersome to implement, but it works.

Thanks @panyann, I saw that comment earlier but didn't realize what it was saying. You are right, it's a little rough, but it does work.

Having this exact same issue. Would love it to be fixed soon. Weird that taking the placeholder out resolves the issue.

How can ngx-bootstrap team underestimate this issue. It is really a big and clear issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juanitavollmering picture juanitavollmering  路  3Comments

KimBum picture KimBum  路  3Comments

Scooviese picture Scooviese  路  3Comments

MihaiHoriaPopescu picture MihaiHoriaPopescu  路  3Comments

haisaco picture haisaco  路  3Comments