devices.css icon indicating copy to clipboard operation
devices.css copied to clipboard

Can't interact with content

Open mrlund opened this issue 9 years ago • 5 comments

No matter what content i place inside the screen div I can't interact with it (i.e. scroll, click etc.) I gather this is by design, and if so, is there a workaround?

mrlund avatar Aug 10 '15 19:08 mrlund

@mrlund Can you check if this still happens with the new version of device.min.css?

olegtsaplin avatar Sep 07 '15 15:09 olegtsaplin

Still an issue. It's very easy to reproduce. Just drop any content in the screen div, and see if you can click on it. I used an iframe, but it fails to work even it it's just a link, i.e.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" href="/css/devices.min.css" type="text/css">
</head>
<body>
    <div class="marvel-device iphone6 silver">
        <div class="top-bar"></div>
        <div class="sleep"></div>
        <div class="volume"></div>
        <div class="camera"></div>
        <div class="sensor"></div>
        <div class="speaker"></div>
        <div class="screen">
            <a href="/blah">Testing</a>
        </div>
        <div class="home"></div>
        <div class="bottom-bar"></div>
    </div>
</body>
</html>

The "testing" link cannot be clicked.

mrlund avatar Sep 08 '15 08:09 mrlund

The screen z-index seems too low. Setting it to 3 instead of 2 solves the issue.

sowenjub avatar Oct 02 '15 08:10 sowenjub

Came across the same problem

Temp fix I used:

.marvel-device {
    pointer-events: none;
}

.your-link-iframe-etc {
    pointer-events: auto;
}

mwvd avatar Apr 07 '16 19:04 mwvd

.marvel-device:after is what is capturing pointer events. This should do the trick:

.marvel-device:after {
  pointer-events: none;
}

bivainis avatar Aug 11 '17 11:08 bivainis