angularjs – ngGrid滚动垂直向后跳跃

前端之家收集整理的这篇文章主要介绍了angularjs – ngGrid滚动垂直向后跳跃前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
这个错误发生在IE9上,它可能也发生在早期版本的IE中.
错误无法在Chrome上重现.

ngGrid,用鼠标滚动不会向下滚动页面.它不断跳回同一个位置.您需要使用浏览器边缘的滚动条来关闭页面.

解决方法

问题出在ngGrid js中的ngGridDirectives.directive’ngViewport’中.

它试图专注于’顶部’元素,这会导致闪烁/跳跃.

解决方案:寻找元素绑定鼠标滚轮

elm.bind("mousewheel DOMMouseScroll",function() {
    isMouseWheelActive = true;
    // if (elm.focus) { elm.focus(); } <-- comment out this line
    return true;
});

猜你在找的Angularjs相关文章