Mobile Safari bug on fixed positioned button after scrollTop programmatically changed…?

后端 未结 11 2199
别跟我提以往
别跟我提以往 2020-11-28 04:10

I\'m just about done a webpage but there is one bug in Mobile Safari (iPhone and iPad iOS 5.0.1) with two buttons that are fixed to the upper and lower right corners..

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 04:29


    After spending a couple of hours on this, I found a workaround: try scrolling (maybe with an animation) and then scrolling again to the same point (without animation).
    This way you force the browser to delete the wrong rendering from the view.

    Example:

    $('body, html')
        .animate({scrollTop: 0})
        .scrollTop(0);
    

提交回复
热议问题