scrolling iframe content on iOS

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

scrolling iframe content on iOS

otheroom
I've got a site that I developed that's used SB for years and I'm trying to get it working on iOS devices, particularly the iPad. I'm finding that it's impossible to scroll the content of an iframe that's been presented by SB. The normal two-finger scrolling does not work, nor does the jQuery scrollTop.

I've created as plain a test bed as I can by including SB 3.0.3 and a simple page that loads a simple iframe. You can see it in action here:

http://dev.otheroom.com/sb/index.html

The iframe has a tiny bit of javascript that waits for 1 second and then executes a 400 pixel scroll.

timeoutID = window.setTimeout(function() {
	$('body,html').animate({
		scrollTop: 400
	}, 2000);
}, 1000);

You can see the iframe page itself here:

http://dev.otheroom.com/sb/iframe.html

Does anyone know of a way to get iframe content to scroll when presented with SB?
Reply | Threaded
Open this post in threaded view
|

Re: scrolling iframe content on iOS

arttronics
I don't have a iOS device but have you tried height with 101% ?
html{
    height: 101%
}

Apart from that, I only have a really crazy idea to share.

Create 10 empty divs for example, each with a unique id:
id="row0"
id="row10"
id="row20"
id="row30"
id="row40"
id="row50"
id="row60"
id="row70"
id="row80"
id="row90"
id="row100"

Each div is positioned from the top of the page according to their row number in percentage. For example, id="row40' is 40% from the top of the page.

Then, perhaps a jQuery vertical bar or image map of a thin bar floating left will do.

This bar will also have hot-spots so that any particular spot when clicked/touched can jump to the corresponding id with row percentage number.

Taking it further, you can have a JavaScript or jQuery routine that creates 100 div's that are each 1% which is divided by the viewport height (different for each iOS device) which should provide for smoother pseudo scrolling effect.

If that idea pans out I am sure lot's of others can use something like that.

Third option is to take a look at Shadowbox 4 with iOS support (ready to use in the build folder) but I don't touch beta software, but feel free to post a question that somebody else might have an answer to.

When posting your markup here on the forum follow these simple steps:

0. Login and paste your markup into the Message Box.
1. Mouse select the markup you just pasted.
2. Press the More Button from the Message Box Toolbar.
3. Select Raw text from the drop down menu. DONE!

If I don't respond to your POST, it's your inability to provide your markup correctly.

Check out a few DEMOS I made that are here in this forum.

Reply | Threaded
Open this post in threaded view
|

Re: scrolling iframe content on iOS

otheroom
Settin the height to 101% didn't have any affect.

I didn't try the absolutely positioned divs idea because I can't get the iframe contents to scroll under any conditions, manually or using javascript.

I wasn't aware of the SB4.0 beta. I may give that a shot.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: scrolling iframe content on iOS

arttronics
To be sure, the div idea is to create your own scrollbar. This scroll bar would be on the right side and is the height of the viewport and does not move itself.

When posting your markup here on the forum follow these simple steps:

0. Login and paste your markup into the Message Box.
1. Mouse select the markup you just pasted.
2. Press the More Button from the Message Box Toolbar.
3. Select Raw text from the drop down menu. DONE!

If I don't respond to your POST, it's your inability to provide your markup correctly.

Check out a few DEMOS I made that are here in this forum.

Reply | Threaded
Open this post in threaded view
|

Re: scrolling iframe content on iOS

Arturo
Amazing that this issue hasn't been solved. I have been trying to reach a solution and people have had problems with this since year 2008!! And version 4 has not come out yet. I love SB and have used it on al my sites but this is a real problem to start checking other solutions.
Reply | Threaded
Open this post in threaded view
|

Re: scrolling iframe content on iOS

Arturo
And I just tried version 4 (beta) and it has the same problem! thumbs down!!!