Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Popup <input> doesn't loose focus #5706
Hello JQM community,
After opening a popup including form elements like input and textarea (only types tested so far) and giving the focus to one of these elements, it is impossible to loose focus again, unless your close the popup.
This bug is visible on the current Demo center.
Steps to reproduce:
@agcolom thanks for the reply!
I did more testing and I could reproduce the bug on all environments:
on Galaxy Note 2 / Android 4.1.2:
on desktop / Windows 7:
If you first click on an input field and then click somewhere else in the popup (like on the "Please sign in" h3), do you loose the focus on the input?
Moreover, I noticed that if you first open a popup, set focus to one of its fields, close the popup by clicking outside, and then open the same popup again, it will automatically set focus to the input after 1 or 2 seconds.
@agcolom I am only reading now the description of the component : "You can place a form inside a popup. When it opens, focus will be restricted to elements inside the popup."
So it seems that this component is behaving so by design and that this is not a bug.
I'm a bit dubious about this behaviour though, as it can be interesting to place other elements in popups that can be focused.
@agcolom actually, this is a bug:
the description says:
but it doesn't say
The behaviour I am experiencing in my Android Phonegap app is that the soft keyboard keeps popin after setting focus to a field inside a popup. I am sure this can't be so by design.
@vkammerer I get what you mean now. Sorry I thought that you could not lose focus on a previously focused input filed inside a a popup. Yes, it seems that the only way to lose focus on an input field inside a popup is to click/tap inside another input field and get that new one into focus. So if this is what you meant, then I can reproduce :-)
@uGoMobi Is that something that we can look at? Outside of popups, tapping/clicking outside of a previously selected (in focus) input field, tapping/clicking outside of that input field will cause it not to be in focus anymore. However, inside the popup, this is not happening. So if you have tapped/clicked inside a form element inside a popup, clicking outside of that form element in the popup will not allow this input field to lose focus (except if you click inside another form element on the popup, but then the problem is just passed to another form element, and so not resolved)