OnLostfocus/ Onfocus problem when switching between two text fields on mobile


#1

Hello,

I’m creating a mobile design in which I now have two text fields that need input from the user.
Since I have a dynamic panel pinned on the bottom of the page that jumps over the input field when the mobile Keyboard is opened, I set up an onfocus event for the input fields to hide this panel. Then OnlostFocus shows the panel again.

This works fine, except when I’m on mobile trying to switch from one text field to the other. The Panel shows again but doesn’t listen to the onfocus event from the other text field to hide it again.

I tried to add conditions for if the cursor is over the other text field, but this doesn’t help either.

OnFocusProblem.rp (275.4 KB)

Is there something else I can do?
Or is there maybe another way to deal with the dynamic pannel that jumps up with the keyboard?


#2

@Barrel

Not sure if i’m expecting the correct result, but it seems work correctly on my mobile device. I jump between the 2 text fields and the panel kept hidden, and the panel was back to visible when the text fields lost focus

different mobile device have slightly different interpretations regarding the same action, so you might want to clear mobile cache and retry (maybe try another browser or even device) if it still persists, I would suggest you try something that looks more compatible

OnFocusProblem.rp (275.5 KB)

In my approach, instead of struggling of OnFocus OnLostFocus kinda of racing game between the 2 text fields. I use hotspot & pageClick instead, i’ve tested in my device and it works fine, hope it’s also working on your side.


#3

Looks like your approach is working better, thanks very much for the help!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.