-
Notifications
You must be signed in to change notification settings - Fork 2.4k
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Popup <input> doesn't loose focus #5706
Comments
@vkammerer I am not experiencing this issue but I have a different setting from yours. Working fine on: |
@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) |
@agcolom thanks! your question to @uGoMobi is exactly what I was trying to explain :-) |
@gabrielschulhof - Can you weigh in here? Thanks! |
@vkammerer Could you please verify that this fix results in the popup behaviour you desire? |
@gabrielschulhof it's all good now, thanks! |
I had the same problem on IPhone. Thanks a lot! |
Hi, this problem seems to have come up again in 1.4.5. Working okay in 1.3.2. Platforms - Safari iOS 8.1.2 (iPad) and Chrome 40.0.2214.93 (Win32).Thanks. Daniel. |
After further investigation, it looks like this issue did not exist in 1.4.4. This is really annoying especially if the first element inside the popup is a select. Thanks. Daniel. |
i have the same problem with 1.4.5, cant loose focus of input popup without clicking another input field... |
Hi Soulcyber, we just ended out using 1.4.4. It may not be the ideal solution and I'm sure it can be worked around but everything else in our application works okay now. Thanks. Daniel. |
Thanks Daniel 👍 |
Is there a solution for 1.4.5? |
I removed ui.focusElement.focus(); and it works fine for me. But is this the right solution? |
mkattner, this is at line 10558 in jquery.mobile-1.4.5.js, right? |
Muchas gracias si me sirvió. |
@gabrielschulhof Please reopen this for 1.4.5 |
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:
1 - go to the popup page of the demo center:
http://view.jquerymobile.com/master/docs/widgets/popup/
2 - Scroll down to the Form section and click the "Sign In" button
3 - Set focus to one of the input fields.
4 - Try to click somewhere else in the popup: You can't loose focus again!
Tested on:
The text was updated successfully, but these errors were encountered: