[CLOSED] Touch Bug over HTML elements

0 favourites
  • 9 posts
From the Asset Store
Get ready to dive into a sea of endless excitement with "Dolphin Jump," the thrilling new game that puts you in control
  • 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

  • Please Scirra don't quit Construct 2 support... The last time Scirra answered a C2 bug report was already 13 days ago...

  • 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.

  • 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).

  • [quote:3591pwod]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.

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

    stefano1234 BadMario

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)