镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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.

uib-dropdown-toggle <input> re-focusing on outside click #6321

Closed

Description

@GAndriyS

Bug description:

uib-dropdown-toggle re-focusing on outside click (e.g. another common, non-dropdown-toggle input)

Steps to reproduce

  1. Click to toggle dropdown menu
  2. Click on common input or outside of dropdown

Observed

Hide dropdown menu , focus returns to uib-dropdown-toggle

Expected

Hide dropdown menu, set focus to clicked element

Link to minimally-working plunker that reproduces the issue:

https://plnkr.co/edit/sxREBmeGwoFBQ4ZnOLIV?p=preview

Version of Angular, UIBS, and Bootstrap

Angular: v1.5.8

UIBS: Version: 2.2.0 - 2016-10-10

Bootstrap: v3.3.7

Activity

  1. svisamsetty commented on Dec 12, 2016

    @svisamsetty

    @GAndriyS I am facing the same issue. Do you have any solution yet?

  2. GAndriyS commented on Dec 12, 2016

    @GAndriyS
    Author

    @svisamsetty not yet, I'm waiting for developer's answer.

  3. kwiateusz commented on Dec 13, 2016

    @kwiateusz
    Contributor

    On 2.3 that error is still present, and it's very annoying

  4. neehouse commented on Dec 13, 2016

    @neehouse

    Having the same problem.. Resolved the refocusing issue by commenting out the focus call on the toggleElement.

    scope.focusToggleElement = function() { if (self.toggleElement) { //self.toggleElement[0].focus(); } };

    Not sure of any impact, but this gave back the ability to focus the items correctly.

    The Angular-UI example, if you toggle a dropdown menu, and the scroll away and click, the same thing of the menu being re-focused occurs.

  5. usos0k commented on Dec 16, 2016

    @usos0k

    Same issue. However, I face the issue only when I build the code as production mode. In my development mode, it works fine. Please anyone help!

  6. alex88 commented on Dec 16, 2016

    @alex88

    Same issue here, clicking everywhere focuses on the toggle element and scrolls the page making inputs not working

  7. nicomelchiori commented on Dec 18, 2016

    @nicomelchiori

    Same here.
    No matter what I do, everything works as expected before a dropdown-menu is clicked. After that, the last dropdown clicked will get focus no matter where I click

  8. lukehutton commented on Dec 19, 2016

    @lukehutton

    I did the following to fix for myself, e07f9fd I updated an existing PR to support something else so obviously better to have separate PR for it

  9. petedavis commented on Dec 19, 2016

    @petedavis

    +1 Thanks @neehouse for the suggested temp fix.

  10. Gusi commented on Dec 20, 2016

    @Gusi

    +1

  11. dougludlow commented on Dec 20, 2016

    @dougludlow
    Contributor

    @lukehutton e07f9fd works great for me! Thank you!

  12. added this to the 2.3.2 milestone on Dec 27, 2016
  13. GAndriyS commented on Feb 10, 2017

    @GAndriyS
    Author

    neither e07f9fd or 955848c don't works for me, described bug still can be reproduced in version 2.5.0

    http://plnkr.co/edit/zanydRnj0ghWiEdvt4Cg?p=preview

  14. rzawar commented on Feb 17, 2017

    @rzawar

    facing same issue. I cannot focus on input in different controller or even in same directive. But I can focus on different dropdown.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions