SVG content is cut off when scrolling in Chrome Mobile - html

I have a set of simple SVG files in a scrollable DIV. You may see a demo here: http://www.ron2.byethost16.com/docviewertest.html This SVG list can be scrolled without problems in all major desktop browsers including Chrome and in some mobile browsers (Edge Mobile, Firefox Mobile and Android browser). However, in Chrome Mobile there is a problem: when scrolling it fast, some content on some SVG images is cut off and is not displayed, after a bit scrolling it may reappear but other content may disappear and so on (see these screenshots: http://imgur.com/a/rxZnK).
My HTML page code follows:
<!doctype html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>Test</title>
<style type="text/css">
iframe {
width: 935px;
height: 1210px;
overflow:hidden;
}
</style>
</head>
<body>
<div style="overflow: auto; width: 100%; height: 100%;">
<iframe src="page1.svg"></iframe>
<iframe src="page2.svg"></iframe>
<iframe src="page3.svg"></iframe>
<iframe src="page4.svg"></iframe>
<iframe src="page5.svg"></iframe>
<iframe src="page6.svg"></iframe>
<iframe src="page7.svg"></iframe>
<iframe src="page8.svg"></iframe>
<iframe src="page9.svg"></iframe>
<iframe src="page10.svg"></iframe>
</div>
</body>
</html>
I suspect it is a bug in Chromium because I experience it not only in Chrome Mobile but in applications built with Crosswalk. Does anyone know how to overcome this problem or is it indeed a browser bug?

Related

why don't iframes work on iPads when you overlay text over it?

I'm writing a web app for a an iPad and I want to overlay an element over an iframe, everything seemingly works fine with nearly all devices.
I have the ability to interact with the link or text that's overlayed and have the ability to touch and use the iframe beneath,
but if I change the device to an iPad on chrome dev tools or other browsers the iframe ceases functionality while the overlayed elements continues to work.
I have simplified it down to this code and the issue still remains:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<style>
.myWrapperClass {
position: absolute;
z-index: 99 !important;
top: 0;
right: 0;
}
iframe {
position: relative;
margin: auto;
}
</style>
<div class="myWrapperClass" id="content">
<div class="myClass">
Some Stuff Here
</div>
</div>
<iframe frameborder="0" src="https://example.com" id="myIframe" width="100%" height="800px">
no show
</iframe>
</body>
</html>
I have tried a lot of things like not using absolute positioning and using negative margins and fixed positions, pointer-events, z-indexing and others but to no avail. The issue still remains on iPads.

iFrame in IE11 - background messed up

I'm trying to iframe this site http://interimincomemodel.com/reps/eugeny/fastsuccess/ into this one http://interimincomemodel.info/fastsuccess/
When I open index.htm on my PC with IE11 the iframe just looks like the original site.
But when I upload it on the server, the background is messed up in IE11: background image is not fit to screen, headlines are not highlighted, email boxes are not rounded.
Also when trying to iframe this website
interimincomemodel.com/reps/eugeny/
into
interimincomemodel.info
the video player controls bar in the iframe is much larger and the last button "play full screen" goes outwards and can't be clicked. It happens in every browser.
I'm using this code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Interim Income Model</title>
<style media="screen" type="text/css">
body {
margin: 0;
padding 0;
overflow:hidden
}
</style>
</head>
<body>
<iframe src="http://interimincomemodel.com/reps/eugeny/" style="border:0px #FFFFFF none;" name="myiFrame" scrolling="auto" frameborder="0" marginheight="9px" marginwidth="100%" height="100%" width="100%"></iframe>
</body>
</html>
What can be causing the issues?
Thanks

Responsive IFrame to display content from External Document

I have an iframe to display the content of a .htm file, which is present in another location. The document loads perfectly while on a desktop browser.
But while on a mobile version, the content of the document is not displayed completely.
I am looking for a responsive iframe for both mobile and desktop views.
HTML
<iframe
id="ifrm"
src="URL.htm"
width="100%"
frameborder="0"
scrolling="no"
height="1450px"
style="padding-top: 0px; float: left;" target="_blank"
/>
I referred these links, but unfortunately they didn't help:
Full-screen iframe with a height of 100%
Scale iFrame css width 100% like an image
Demo with bootstrap website in iframe
Make sure you have
<meta name="viewport" content="width=device-width, initial-scale=1" />
in <head> of your document.
Try like this LINK
HTML:
<div class="iframe">
<iframe src="http://a.rgbimg.com/cache1wZTwK/users/m/mi/micromoth/600/oIejAt8.jpg" frameborder="0"></iframe>
</div>
CSS:
.iframe {
position:relative;
}
iframe, object, embed {
max-width: 100%;
min-width: 100%;
}

Is it a way to correct Internet Explorer view of an absolute iframe?

I have an iframe used as an index file to hide a url of next website.
<iframe style="position:absolute; top:0px; left:0px; " src=" http://..." width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>
This all works in all known to me browsers instead of Internet Explorer (checked on 9). Is it a simple way to make it visible correctly?
First of all mixing html attributes with css is nasty thing.
Anyway this should work flawlessly if you are looking for fullscreen iframe:
CSS:
/* notice you actually don't need absoulte positioning */
body,html,iframe {
margin:0;
padding:0;
width: 100%;
height: 100%;
}
body,html {
overflow: hidden;
}
HTML:
<html>
// add head, css
<body>
<iframe src=""></iframe>
</body>
</html>
Unfortunately, not that I've found. Instead, you would need to use JavaScript to monitor window size.
Or just use a regular frame:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Page title</title>
</head>
<frameset rows="*">
<frame src="http://..." />
</frameset>
</html>

Scrolling iframe on iOS is solved, BUT the iframe page display incomplete

I am trying to scroll an iframe on iOS, and I succeeded, it's scrolling well, reference:
http://home.jejaju.com/play/iframe-scroll.html
http://areaaperta.com/nicescroll/demo.html
BUT, all solutions have an issue: the iframe page is not completely displayed...
I tested on my iphone and ipad, the iframe page displays choppy.
any idea?
Example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=9;FF=3;chrome=1;OtherUA=4" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.js"></script>
<script type="text/javascript">
$(function(){
if (/iPhone|iPod|iPad/.test(navigator.userAgent))
$('iframe').wrap(function(){
var $this = $(this);
return $('<div />').css({
width: $this.attr('width'),
height: $this.attr('height'),
overflow: 'scroll',
'-webkit-overflow-scrolling': 'touch'
});
});
})
</script>
<title>Untitled</title>
</head>
<body>
stuff
<div>
<iframe src="iframe-scroll-long.html" height="500" width="500"></iframe>
</div>
more stuff
</body>
</html>
This solution is a bit of a hack, but is tested and works fine on iOS:
<div style="width: 760px; height: 500px; overflow: scroll !important;-webkit-overflow-scrolling:touch !important;">
<object type="text/html" data="HTTP://YOURPAGE.URL" style="width:1000px; height:10000px;">
</object>
</div>
Basically, since scrolling works fine in a DIV, you embed your page code using the object tag. The problem is, due to the same origin policy, you can't determine your target page's dimensions. I found that setting a huge page size is perfectly workable (no delay or choppyness noticed...just blank space)
You can easily determine the client OS and only add this code to iOS devices.
I found a combination of div with "absolute" style and nicescroll do fix choppines.
You have to load nicescroll on the page loaded by iframe.
In the same page wrap all you content with a div (with style absolute)
#content { position:absolute; }
Load nicescroll using wrapped div content.
$(document).ready(function() {
$("html").niceScroll("#content");
});
Link to demo page, so you can check the code: http://areaaperta.com/nicescroll/demo/iframe6.html
Automatically, with iOS native scroll has used, in other platform you got nicescroll active.
I have test on iPad with iOS 5.1.
Try adding -webkit-transform:translate3d(0,0,0) to the iframe style and all elements within to force hardware acceleration - should reduce the choppiness.
In main page style:
iframe { -webkit-transform:translate3d(0,0,0); }
and in iframe style:
p { -webkit-transform:translate3d(0,0,0); }
I found this to be a problem with relatively positioned content inside the frame.
Get rid of this behavior when removing position: relative;