Archive for the ‘css’ Category

There are times when you want to prevent copying

I found when developing a painting application that I did not want to allow text copying on a canvas element. With the iPad and iPhone this can be done with CSS.

.no-copy {
  -webkit-user-select: none;

Now simply add this to the elements you do not want to have the copy dialog appear.

  <canvas id="touchpaint" class="no-copy"></canvas>

Read Full Post »