Skip to main content
added 25 characters in body
Source Link

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in an iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe in the rotated iframe, preview() is triggered. but swipeleft and swiperight doesn't work.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe, preview() is triggered. but swipeleft and swiperight doesn't work.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in an iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe in the rotated iframe, preview() is triggered. but swipeleft and swiperight doesn't work.

deleted 70 characters in body
Source Link
James Z
  • 12.3k
  • 10
  • 26
  • 46

everyone!

I need urgent help.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe, preview() is triggered. but swipeleft and swiperight doesn't work.

Could you help me?

Thank you.

everyone!

I need urgent help.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe, preview() is triggered. but swipeleft and swiperight doesn't work.

Could you help me?

Thank you.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe, preview() is triggered. but swipeleft and swiperight doesn't work.

Source Link

Hammer.js swipe does not working on rotated iframe

everyone!

I need urgent help.

I made an iframe on the page and rotated it by transform.

    body.rotate iframe {
        transform: rotate(90deg);
        transform-origin: top right;
        position: absolute;
        top: 100%;
        right: 0;
        height:100vw;
        min-width:100vh;
    }

and tried to add swipe event on the page in iframe.

    var el = document.getElementById('swipe');
    Hammer(el).on('swipeleft', next);
    Hammer(el).on('swiperight', prev);
    Hammer(el).on('doubletap', preview);

When I doubletap on div#swipe, preview() is triggered. but swipeleft and swiperight doesn't work.

Could you help me?

Thank you.