question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropdown not closing when tag is created by enter

See original GitHub issue

I’m submitting a … (check one with “x”)

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x] support request/question

Current behavior I’m using the latest published ngx-chips. I insert the html and js exactly as shown in the demo folder in the autocomplete example:

<div>
<h3>Tags within an autocomplete component</h3>
     <tag-input [ngModel]="['@item']"
                    [addOnBlur]="true"
                    [clearOnBlur]="true">
           <tag-input-dropdown [autocompleteItems]="autocompleteItems">
            </tag-input-dropdown>
    </tag-input>
</div>
autocompleteItems = ['Item1', 'item2', 'item3'];

When i enter a string in the tag-input control, the dropdown opens as expected. If i then hit enter to create the tag, or if i finish typing and hit enter (without selecting anything in the dropdown), then the dropdown stays open.

Note: This does not happen on the demo page (http://www.buompris.co/ng2-tag-input/). So my bug report is more a question as to if something has changed that would result in the behaviour of the dropdown only closing if something is selected by mouse. The other possibility is of course that something is wrong with my setup.

Expected behavior The dropdown is expected to close when a tag is created.

Minimal reproduction of the problem with instructions (if applicable) See code provided above.

What is the motivation / use case for changing the behavior? (if applicable) n/a

What do you use to build your app? (SystemJS, Webpack, angular-cli, etc.). Please specify the version angular-cli 1.1.3

Angular version: angular 4

ng2-tag-input version: Most recent published version of ngx-chips

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all

Thank you for an otherwise excellent component!

Best regards, Christian

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Gbuompriscocommented, Jul 7, 2017

Hi @anafreitas, try version 1.4.5, it should fix your issue

0reactions
anafreitascommented, Jul 7, 2017

@Gbuomprisco It worked, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Foundation - Prevent dropdown from closing when clicking a ...
But when a user clicks on the select tag foundations dropdown menu closes not allowing them to pick a language.
Read more >
Dropdown is not getting close in the Lightning Input box in LWC
Hi I have created the lightning input box which contains some value as a drop down but when i am clicking outside of...
Read more >
How to avoid dropdown menu to close menu items on clicking ...
How to avoid dropdown menu to close menu items on clicking inside ? · Click Inside: · Click Outside: O/P after click outside....
Read more >
Solved: How to not reset a dropdown after closing and reop...
I have a dropdowns with Items =[" ",""Yes","No]; Default=false; Reset= false display mode: edit. It is reseting to the blank " ", I...
Read more >
How To Handle Dropdowns In Selenium WebDriver Using ...
# try clicking 'lang select' elements with car dropdown elements hovering over it. Notice Car elements are not clickable. carDropdown = driver.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found