0

Hello I am trying to disable selecting items on my mobile site. I can do this fine on a normal site with the following css class

.unselectable {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;
}

but it does not work on the mobile. I am using AngularJS Is there something to disable the user from selecting items via touch?

user3562751
  • 263
  • 1
  • 5
  • 15

2 Answers2

0

The most standard way to do this is with the disabled="disabled" attribute value pair in the HTML element you want to disable.

<input type="text" disabled="disabled" />

Is there a reason you're not using this? Perhaps I am misunderstanding the question?

0

I usually use something like this:

    document.getElementById("Id").disabled = true;

I don't particularly understand why you are recreating something that has essentially been implemented already.

Matt
  • 18
  • 6