2

I have an iframe which is blocking the layer below and dose not let it to scroll by touch in phone and tablet devices. Is there any way to disable the touch only on the iframe using it's class name or the class name of the div that is holding it?

Bondsmith
  • 1,343
  • 3
  • 13
  • 27
  • what do you mean touch? or do you mean scroll -- http://stackoverflow.com/questions/15494568/html-iframe-disable-scroll – Tasos Aug 18 '14 at 03:10

1 Answers1

0

Use CSS pointer-events to disable any touch events on the element:

iframe {
  pointer-events: none;
}

https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events

JSFiddle example:

http://jsfiddle.net/eyync6mp/2/

Miguel Mota
  • 20,135
  • 5
  • 45
  • 64
  • 3
    As I mentioned in the title, "I need to keep the clicking ability" so I cannot use pointer-event – Bondsmith Aug 18 '14 at 00:29
  • Oh, I see what you're saying. I was confused because you said "Is there any way to disable the touch only on the iframe..." – Miguel Mota Aug 18 '14 at 00:32