Embedding in iframe breaks click & drag ...

Bugs will be moved here once resolved.

Post » Mon Jul 29, 2013 9:05 pm

https://dl.dropboxusercontent.com/u/80050021/ScrollTestFixed.capx


Steps to reproduce:
1. Run the app.
2. Click and then drag up and down to scroll the red rectangles.
3. Try to go out-of -bounds in iframe by still holding, which seem to occurs naturally for anyone playing and leave the button unpressed.
4. Then you go back inbounds and it still thinks the button is pressed and you were still able to scroll back and forth without even clicking and then it hangs after.

Observed result:
It hangs and it allows you to scroll even if you are not clicked.


Expected result:
once the button is released it should go back normal so that even i go out-of-bounds it should still works when i come back in-bounds.


Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 7

Construct 2 version:
v133b
    
More Information [/b>
I embedded my app in an iframe, https://dl.dropboxusercontent.com/u/80050021/ScollTest/iframe.html, my app has a drag to scroll controller which i can hold and drag to scroll up and down.

Everything works fine as it is , But when i am embedding in an iframe and in case if my drag goes beyond inframe bounds then everything kind of get struck and breaks even i get my cursor inbound to the iframe. Even after i release the cursor it still thinks that i am still pressing it .

Trying to figure out how to resolve, any help ?

This is link https://dl.dropboxusercontent.com/u/80050021/ScollTest/ where everything works fine without the iframe.

Here is the capx, https://dl.dropboxusercontent.com/u/80050021/ScrollTestFixed.capx
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Wed Jul 31, 2013 9:08 am

Can anyone help i already have my game in Kongregate.com and gamers are complaining already because of the iframe embed issue. please help !
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Thu Aug 01, 2013 6:50 am

did you try to clamp dragging?
for example
mouse cursor Y<5 and Y>595 stop dragging (595 is your window height-5)
that way this will force stop stop dragging in that 5 pixels border even if player will still keep mouse button pressed



ImageImageImageImage
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Mon Aug 05, 2013 6:02 pm

Can you reproduce in r139? Why are you still on an old beta release? It has lots of known bugs we've already fixed. Usually we don't accept bug reports that are not tested in the latest version.

I think we can't fix this, because it's not a Construct 2 bug, it's a browser issue. For security reasons browsers don't let the iframe know about mouse events that happen over a different frame, so dragging out the frame will mean the mouse up is not sent to the iframe, so it still thinks the mouse is down. Perhaps there is some CSS/JS workaround, I'm not sure...
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145

Post » Sat Aug 10, 2013 5:08 am

Oh, which means my type of game can't be embedded in iframe where drag and scroll is needed ? I am sure there might be some way to fix. please help !
B
16
S
4
Posts: 248
Reputation: 2,267


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests