1

I have a page the allows a user to create a signature using a touch screen or mouse. The touch screen works fine in Chrome but not in IE. Most of the time IE does not 'detect' that I am using a touch screen. We detect touch like this:

          if ('ontouchstart' in window == false){
// rest of code 
}

The canvas element looks like this:

<canvas id="paint" style="border: solid; background-color: White; cursor: pointer;"
runat="server"></canvas>

Is there a better approach to allow users to add a signature on a touch screen? I am looking for something that is HTML5 compliant and will work reliably on IE.

  • Touchscreens are usually emulated as a mouse, so if you just make it work with a mouse, it should also work just fine with a touchscreen. Any touchscreen, on any browser. Generally, you only need to be touchscreen aware if you need to do fancy stuff like multi-touch. So, have you tried doing it with a mouse first? Why is a mouse-only implementation not good enough for you? – Mike Nakis Sep 10 '15 at 14:29
  • Good point. The code was designed to initialize for 'mouse' always, and mouse/touch if 'touch' was detected. However, I just tried running both functions that initialize for mouse and touch. The touch screen seems to work on IE but not consistently. I have to touch the screen multiple times, then it works. It's as if there is a delay or an event that triggers the 'touch'. That is what users are complaining about. – Dylan Sep 10 '15 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.