IE10 Repaint/Redraw issue

两盒软妹~` 提交于 2019-12-10 14:07:18

问题


You can see this working/breaking here: http://new.campchampions.com/parents

The issue only crops up in IE10. After the user has scrolled a little ways, the navigation becomes pinned (a class of fixed gets added to the body which effects the hgroup.primary(I know, I know hgroup is not a 'thing' anymore. Don't judge me.)). If you go back to the top of the page, it un-pins, goes back to normal.

In IE10, when you go back up to the top of the page, the nav elements disappear until the mouse moves up over ANY part of the yellow bar. It's driving me nuts.

I've attempted things like having JS append/alter content in various elements on scrolltop/un-pinning the navigation.

I've got a brief youtube video showing the issue: http://youtu.be/-itTC_j-9YE

Any thoughts, or ideas? That'd be great. Thanks!


回答1:


While I have no solid answer for the reason behind this redraw issue, I found that an instantaneous jQuery hide/show redrew the element completely without any visible side effects.

Using a non-jQuery JS hack to add a class to the HTML element in IE10 (see Willem de Wit's answer to this quandry), I made sure this code only fired on IE10.

if($('html').hasClass('ie10')) {
  $('.primary').hide(0, function(){$(this).show()});
}


来源:https://stackoverflow.com/questions/18068846/ie10-repaint-redraw-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!