sorccu/cufon — Issue #215: Scroll issue on iPhone
Author: codecowboy
Created: 2011-10-26 08:45:52+00:00
State: open

I have a div containing a cufon replaced headline. The div can be scrolled by custom buttons using the following code:

```function ScrollUp() {

var topVal = parseInt($(".entry-content").css("top"),10);

if (topVal < 0 && !$(".entry-content").is(':animated') ) { //This is to stop it when it reaches the top
$(".entry-content").animate({"top":topVal + 200 + 'px'}, 800, "easeInOutCubic");
mosaic_p_position = $(".entry-content > p").last().offset().top; // this is the position of the last paragraph within the div

}

}

function ScrollDown() {
mosaic_p_position = $(".entry-content > p").last().offset().top;

var topVal = parseInt($(".entry-content").css("top"),10);

if( mosaic_p_position > 350
&& !$(".entry-content").is(':animated')) {

$('.entry-content').animate({"top":topVal - 200 + 'px'}, 800, "easeInOutCubic");
mosaic_p_position = $(".entry-content > p").last().offset().top;

}
}```

This works on all browsers EXCEPT iPhone Safari in iOS 4 OR 5. I hHaven't tested earlier iOS versions. When scrolling the div, the cufon headline remains in place and obscures the text in the div. Note that the scrolling is done using custom buttons and not standard browser scrollbars.

Is there any way I can work around this issue?