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?
Asked
Active
Viewed 3,778 times
1 Answers
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:

Miguel Mota
- 20,135
- 5
- 45
- 64
-
3As 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