Harvest-Dev / ng-select2

A select2 for Angular
MIT License
52 stars 32 forks source link

Using autoCreate it can be tricky for the user to be able to beging typing free text #49

Closed sirenbrian closed 1 year ago

sirenbrian commented 1 year ago

Hello, You recently added the autoCreate, a feature we are very happy to have. There's a slight issue with it - we have a simple dropdown list of choices (no groups, just a short list of text strings) in your component, but using the mouse we can't get it so that the user can start typing free text.

Here's what you get when you click on the control with the mouse

image

Once the list is showing, it doesn't go away until you press ESC on the keyboard or choose one of the values shown.

The only way I found I could get to the free text entry to work is to click on an earlier control and press the TAB key until focus reached the control. The blinking cursor appears and I can start typing.

When I tried to repro this in your demo I could not - the control actually let me start typing right away. Possibly because the demo includes groups of text choices? Maybe that makes the focus control behave differently.

I'm happy to put more screenshots in if that's what you need, or I can put a private video on youtube or something to clarify.

Zefling commented 1 year ago

Probably fixed in 13.0.0

Chralex commented 1 year ago

@Zefling FYI:

I'm trying to use this in version 13, and it does not work. It behaves like the described in the first post.

If I set overlay to true then it seems to work, but that just gives other issues with positioning, it seems to change the focus from the input field to an element in the dropdown list when it is false.

Zefling commented 1 year ago

Ok, I reproduce the bug: https://stackblitz.com/edit/stackblitz-starters-savcyr?file=src%2Fmain.ts

Zefling commented 1 year ago

It's probably fix in 13.0.1 :face_with_spiral_eyes: