How do I set focus from iFrame

Get help using Construct 2

Post » Thu Apr 09, 2015 8:28 pm

Hi everyone,

I have a situation where i'm using the pode iframe to pull up something. i have a continue button below it that is my button. what I'm noticing is that when the screen comes up and I click the continue button, it doesn't register but the second click does.

This seems like a focus issue, so I went and added the browser plug which has a focus action in it, but this doesn't seem to help.. i've tried a number of variations without the same results.

Does anyone know a trick to insure that when a layout loads and an iframe appears, the focus of the screen can focus back on the screen the iframe is laying on?

Thanks
Caleb
B
55
S
9
G
1
Posts: 921
Reputation: 6,399

Post » Sun Apr 12, 2015 2:49 am

Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sun Apr 12, 2015 3:23 am

interestingly the problem doesn't occur on mobile browsers.. it seems to be isolated to Chrome/Safari/IE (so far) that have the issue..

@TheDom As for how to address this, how would I insert code like this into the project? Would I have to go and edit the c2runtime.js file directly? or can code like this be somehow integrated into the project in C2?


Thanks!
Caleb
B
55
S
9
G
1
Posts: 921
Reputation: 6,399

Post » Sun Apr 12, 2015 5:17 pm

I would edit the index.html file
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,273

Post » Sun Apr 12, 2015 5:20 pm

@TheDom ok cool, that does seem like it would cut to the root of the issue.. now to figure out how to code javascript.. heh..

Thanks!
Caleb
B
55
S
9
G
1
Posts: 921
Reputation: 6,399


Return to How do I....?

Who is online

Users browsing this forum: plinkie and 6 guests