Disable drag touch event in ios safari or chrome?

0 favourites
  • 2 posts
From the Asset Store
Use inertion of your movements to throw, rotate your objects and etc. Objects can interact with others while dragging.g
  • I have developed a game like fruit ninja and exported it to html, but when I slice the object my safari (also chrome) browser gets dragged and zoomed. How do I disable it from happening.

    Any help or suggestion would be much appreciated. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This could be done by manually inserting CSS into your exported project.

    Step 1: Export project as HTML5

    Step 2: Find style.css in your downloaded project folder

    Step 3: Open the file in Notepad, find the line "body, html { }" (without " ") and inside of the brackets { } add this line:

    -webkit-user-drag: none;

    Step 4: Save file

    The line should then look like this:

    html, body {

    -webkit-user-drag: none;

    (other similar code can be seen inside)

    }

    If that doesn't work, try doing adding this line to the file style.css

    * {

    -webkit-user-drag: none;

    }

    This should work for both Chrome and Safari.

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