Commit 2e0078a6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed iframe not focused onload

parent dc9bfc51
......@@ -2,8 +2,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
</head>
<body>
<iframe id="mg-framed" src="{{ $url }}" autofocus="true" onload="this.contentWindow.focus();"></iframe>
<iframe id="mg-framed" src="{{ $url }}" autofocus="true"></iframe>
<script nonce="{{ $mgv }}">
document.querySelector("iframe").src += "&js=true";
document.querySelector("iframe").onload = function(e) {
e.target.contentWindow.focus();
}
</script>
</body>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment