Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Typeahead is-open change via document click does not trigger digest on original scope #5467

Closed

Description

@trogowski

When typeahead's drop-down is open, clicking outside of it closes the drop-down but variable bound to is-open does not change to false. Here's a minimal test case.

Changing 'scope.$digest()' to 'originalScope.$digest()' here seems to fix the problem.

Activity

  1. icfantv commented on Feb 12, 2016

    @icfantv
    Contributor

    This looks like a good catch. @wesleycho, thoughts?

  2. mkozhukharenko commented on Feb 17, 2016

    @mkozhukharenko

    I've encountered the same problem +1

  3. mkozhukharenko commented on Feb 17, 2016

    @mkozhukharenko

    Found temporary workaround:

    <input type="text" click-outside="typeaheadIsOpen = false;" ng-model="model" uib-typeahead="option as option.name for option in new.options | filter:{$:$viewValue}" typeahead-is-open="typeaheadIsOpen">

    I used click-outside directive to manipulate typeaheadIsOpen variable;

  4. azizmaredia20 commented on Feb 19, 2016

    @azizmaredia20

    Hi mkozhukharenko,
    can you please share your click-outside="typeaheadIsOpen = false;" directive code

  5. azizmaredia20 commented on Feb 19, 2016

    @azizmaredia20

    Does anyone has a fix for this isssue?

  6. icfantv commented on Feb 19, 2016

    @icfantv
    Contributor

    @azizmaredia20, hi there. Please understand that we are all unpaid volunteers on this team, managing a VERY popular OSS project. It maybe as simple as making the change indicated above, but we would need to make sure it doesn't have any negative side effects. I've flagged it as needing investigation and we will get to it. You will need to be patient.

    Barring that, you could always fork the repo and make the change yourself using a custom build until this issue is fixed.

  7. azizmaredia20 commented on Feb 20, 2016

    @azizmaredia20

    @icfantv, Yes sure i will fork the repo and try to solve the issue

  8. mkozhukharenko commented on Feb 20, 2016

    @mkozhukharenko
  9. wesleycho commented on Mar 5, 2016

    @wesleycho
    Contributor

    Similar to the recently fixed issue with 313ba83, we should change this to originalScope.

  10. added this to the 1.2.3 milestone on Mar 5, 2016
  11. added a commit that references this issue on Sep 28, 2024
    7949494
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions