Jump to content

Canvas problems on touch device


johnsmith153

Recommended Posts

I am using this: http://www.crowdsavings.com/open-source/drawbox (http://page-test.co.uk/jquery.drawbox.js is the main JS file).

 

It works fine on desktop browsers, but there is an issue on every Touch mobile phone I have tried. When you draw on the canvas and then go to click a button off the canvas, it doesn't work. You need to touch off the canvas and then the button.

 

So using the demo above, if you draw on the canvas and then click the 'Clear Canvas' button, it doesn't work and you have to press it again. I have tried setting focus on the body and also detecting what the focus is when a touch action is performed, but no luck. I know the entire screen is responsive to touch and mouse events, where I would have thought it best to just make the canvas section respond to touch/mouse events.

Link to comment
https://forums.phpfreaks.com/topic/258097-canvas-problems-on-touch-device/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.