Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typeahead dropdown doesn't hide on blur when item is hovered over #1495

Closed
hafarey opened this issue Jan 14, 2017 · 2 comments
Closed

typeahead dropdown doesn't hide on blur when item is hovered over #1495

hafarey opened this issue Jan 14, 2017 · 2 comments

Comments

@hafarey
Copy link

hafarey commented Jan 14, 2017

I updated from 1.1.16 to 1.2.1 and encountered this new behavior. It can be reproduced on the current demo site (reproducible as of 13 January 2017).

Steps

  1. On the typeahead page of the ng2-bootstrap demo site, go to the Static array section and enter new
    (A few state names should appear in the dropdown.)

image

  1. Make sure not to hover the mouse anywhere over the dropdown list. Then click anywhere outside the input box and the dropdown.
    (The dropdown should go away.)
  2. Repeat Step 1.
  3. This time around, hover the mouse cursor over any of the state names in the dropdown.
  4. Click anywhere outside the input box and the dropdown.

Behaviors
After Step 5:

  • In 1.1.16, the dropdown goes away.
  • In 1.2.1, the dropdown does not go away.

I can't find notes on whether the 1.2.1 behavior is intended as designed. As a user, however, I prefer 1.1.16 behavior as the better one. Hovering over an item in the typeahead dropdown should not prevent the dropdown from going away on mouse blur.

It seems that in 1.2.1, TypeaheadDirective.onBlur(), the this._container.isFocused property is returning true when the component should no longer be in focus.

@valorkin
Copy link
Member

Awesome reproduce steps, I have reproduced an issues, so I will be able to fix it fast
Thank you

@valorkin
Copy link
Member

fix not yet pushed, but demo page is updated
please check: http://valor-software.com/ng2-bootstrap/#/typeahead#static

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants