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

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

Closed
GAndriyS opened this issue Nov 14, 2016 · 13 comments
Closed

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

GAndriyS opened this issue Nov 14, 2016 · 13 comments
Milestone

Comments

@GAndriyS
Copy link

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

@svisamsetty
Copy link

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

@GAndriyS
Copy link
Author

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

@kwiateusz
Copy link
Contributor

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

@neehouse
Copy link

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.

@usos0k
Copy link

usos0k commented Dec 16, 2016

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!

@alex88
Copy link

alex88 commented Dec 16, 2016

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

@nicomelchiori
Copy link

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

@lukehutton
Copy link

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

@petedavis
Copy link

+1 Thanks @neehouse for the suggested temp fix.

@Gusi
Copy link

Gusi commented Dec 20, 2016

+1

@dougludlow
Copy link
Contributor

@lukehutton e07f9fd works great for me! Thank you!

@wesleycho wesleycho added this to the 2.3.2 milestone Dec 27, 2016
@GAndriyS
Copy link
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

@rzawar
Copy link

rzawar commented Feb 17, 2017

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests