Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window 8 Tablet #91

Closed
miker42 opened this issue Sep 4, 2013 · 4 comments
Closed

Window 8 Tablet #91

miker42 opened this issue Sep 4, 2013 · 4 comments

Comments

@miker42
Copy link

miker42 commented Sep 4, 2013

I have implemented the Signature Pad in an asp.net, c# application and it works fine on an iPad and Android tablet. It also works fine on a PC running IE 10 using a mouse. But it does not work on a Windows 8 Tablet. When trying to create a signature all it will do is create a dot wherever you start to sign. The entire web page moves as if you are trying to scroll the page as you try to create to signature. I suspect this is the reason it fails. Any ideas as to how to correct this?

@thomasjbradley
Copy link
Contributor

I'm having some troubles with Win 8 devices because I don't have one to test. I've tried a couple things but am not sure of the cause.

@meagar
Copy link

meagar commented Sep 9, 2013

@miker42

TLDR; you need to apply the style -ms-touch-action: none to your element.

We hit the same issue about 8 months ago, you just need to apply the above vendor-specific style to tell IE10 that the element has some extra-ordinary user interaction and shouldn't be treated like a drag handle for the window.

Our CSS looks like this (I'm certain that the rule doesn't need to be applied to both the container and the canvas, I think I was lazy when I fixed the issue), given our markup of roughly <div class="signature-pad"><canvas with="700" height="150" /></div>:

.signature-pad {
  -ms-touch-action: none;
}

.signature-pad canvas {
  -ms-touch-action: none;
}

I'm actually just about to try and find the Android equivalent.


Just noticed that the CSS included with the project actually provides many rules for disabling dragging for signature elements, but they're only applied to .current .pad:

-ms-touch-action: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;

@thomasjbradley
Copy link
Contributor

Is it possible that we need the CSS property on a wrapper element also for it to work properly?

@thomasjbradley
Copy link
Contributor

It seems that my CSS had a selector .current .pad, that doesn't seem to work properly. Changing the selector to just .pad fixes the problem. It'll be fixed in 2.4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants