[CLOSED] Touch Bug over HTML elements

Bugs will be moved here once resolved.

Post » Tue Oct 24, 2017 8:34 am

Problem Description
If you touch an HTML element and move your finger, condition "Touch -> Is in touch" becomes false.

Attach a Capx
capx

Description of Capx
There is a Text Box (HTML element) and the touch Plugin, so you can test it yourself.

Steps to Reproduce Bug
  • Run the project in Chrome
  • Hit F12 (developer tools)
  • Hit Ctrl + Shift + M (to simulate touch on a mobile phone)

Observed Result
"Is in touch" becomes false although you are still touching.

Expected Result
"Is in touch" should be true.

Affected Browsers
  • Chrome: (YES)
  • Android Devices: (YES)

Operating System and Service Pack
Windows 10

Construct 2 Version ID
r246 beta release
Last edited by ChesVCF on Thu Nov 16, 2017 6:44 pm, edited 1 time in total.
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Mon Oct 30, 2017 5:32 pm

Please Scirra don't quit Construct 2 support... The last time Scirra answered a C2 bug report was already 13 days ago...
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Sun Nov 05, 2017 12:33 am

Please Scirra, could you take a look at it? I'm holding an update for my app because I need this issue to be solved.
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Mon Nov 06, 2017 3:18 pm

sorry, i have a simillar problem
when a game run on a iframe run in touch device(mobile o desktop simulation touch)

onTouchedObject event on a Sprite ("touch start")
this event is called twice(on "start" and "end" touch interactions)
is call twice .
this problem occurs when the game runs on an iframe (I think).
B
6
S
1
Posts: 1
Reputation: 354

Post » Tue Nov 07, 2017 11:39 am

sorry, i have a simillar problem
when a game run on a iframe run in touch device(mobile o desktop simulation touch)

onTouchedObject event on a Sprite ("touch start")
this event is called twice(on "start" and "end" touch interactions)
is call twice .
this problem occurs when the game runs on an iframe (I think).


I had the same problem that was ruining the game.

Solution: disable touch - use mouse input in touch properties.

Then have separate Touch and Mouse control groups which you enable or disable depending on how a player starts the game ( touched or clicked first )
The problem was that in iFrame a single touch would count as touch and mouse click.

In most games this doesn't really matter, but in some it does.
B
27
S
12
G
2
Posts: 68
Reputation: 3,161

Post » Tue Nov 07, 2017 4:08 pm

I wonder if this is related to my post here no-audio-in-iframe-on-chrome-android_t197440 I can't seem to get audio playing on Chrome Android in an Iframe.

@stefano1234 @BadMario
Image
B
30
S
8
G
1
Posts: 120
Reputation: 2,862

Post » Sat Nov 11, 2017 7:03 pm

I solved it!!! You have to put "touch-action: none;" in the HTML element's style properties. Anyway, I still think this is a Construct 2 bug and I'm really angry because Scirra didn't even read my bug report (and they had time). Now that I know how easy the solution is, I'm sure they could have found it very quickly (and I needed about 20 days and very much research on other forums). But they didn't even answer, and it's very frustrating.
B
21
S
7
G
1
Posts: 165
Reputation: 1,912

Post » Wed Nov 15, 2017 12:27 pm

This is currently by design. Touches on HTML elements are dispatched to those elements only, and not used by the runtime. Otherwise you get weird effects like clicking buttons fires touch/mouse click events which can cause unwanted events to run. For example a game might play a sound on every click and create an explosion by the mouse/touch, but have an OK button where they don't want that to happen when the button is clicked. This is what the current behavior is aimed at.

As you've pointed out you can modify the style of elements yourself using the 'Set CSS style' action if you want to adjust this behavior.
Scirra Founder
B
405
S
239
G
91
Posts: 24,760
Reputation: 197,314

Post » Thu Nov 16, 2017 6:40 pm

You're right, I didn't think of that. This isn't a bug, so I'm closing the topic. It's only that I felt I was being ignored which annoyed me. Everything cleared :)
B
21
S
7
G
1
Posts: 165
Reputation: 1,912


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests