【问题标题】:Using angularJs to modify css.height causes Internet Explorer to not scroll to the bottom of the page使用 angularJs 修改 css.height 导致 Internet Explorer 无法滚动到页面底部
【发布时间】:2015-06-18 16:27:24
【问题描述】:

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

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

关键的代码行是:

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

【问题讨论】:

    标签: javascript html css angularjs ng-grid


    【解决方案1】:

    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;
    }
    

    帮助来自:https://stackoverflow.com/a/25171252/2451726

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-26
      • 1970-01-01
      • 2014-02-28
      相关资源
      最近更新 更多