使用 angularJs 修改 css.height 导致 Internet Explorer 无法滚动到页面底部

Using angularJs to modify css.height causes Internet Explorer to not scroll to the bottom of the page

当我尝试动态设置 ngGrid 组件的高度(使用 ngFlexibleHeightPlugin)时,我无法在 Internet Explorer 11 中使用鼠标滚轮滚动到页面底部(并且降低)。

该问题仅在大于屏幕尺寸的高度上出现,并且仅在使用鼠标滚轮滚动时出现。

关键代码行是:

self.grid.$viewport.css('height', newViewportHeight + 'px');

ng-grid.js 中的 mousewheel() 函数导致了 Internet Explorer 的问题。

如果您在 ng-grid.js 中对以下块 if (elm.focus) { elm.focus(); } 进行评论,它将解决问题。

function mousewheel() {
    isMouseWheelActive = true;
    //if (elm.focus) { elm.focus(); }
    return true;
}

帮助来自: