After creating a rotated iframe on the page using CSS transforms, I attempted to implement swipe events within the iframe.
body.rotate iframe {
transform: rotate(90deg);
transform-origin: top right;
position: absolute;
top: 100%;
right: 0;
height:100vw;
min-width:100vh;
}
I added swipe functionality to the iframe element as shown below:
var el = document.getElementById('swipe');
Hammer(el).on('swipeleft', next);
Hammer(el).on('swiperight', prev);
Hammer(el).on('doubletap', preview);
However, even though doubletapping on div#swipe in the rotated iframe triggers the preview() function, the swipeleft and swiperight events do not work as expected.