简体   繁体   English

可移动屏幕无法在Chrome上正确滚动

[英]Handsontable not scrolling properly on Chrome

I am currently having an issue with handsontable on Chrome. 我目前在Chrome上的handontable遇到问题。 What appears is that the table is scrollable, but the values and row headings are not updating. 出现的情况是该表是可滚动的,但是值和行标题未更新。 The situation can be seen from the below pictures. 从下图可以看到情况。

Not Scrolled 不滚动

原版的

Scrolled to Right and Down 上下滚动

在此处输入图片说明

As you can see, the scrolling takes place, but the values do not update. 如您所见,滚动发生了,但是值没有更新。 I should note, that this behavior only happens on Chrome. 我应该注意,此行为仅在Chrome上发生。 On Firefox and Safari, the table works as expected. 在Firefox和Safari上,该表可以按预期工作。

So more information about my environment. 因此,有关我的环境的更多信息。

  • Using Handsontable 0.28.0 使用Handsontable 0.28.0
  • Also using AngularJS and Angular Material 也使用AngularJS和Angular材质

The code that I used to create this example is as follows 我用来创建此示例的代码如下

var Handsontable = require('handsontable');
// This function finds a div I am using, removes its contents, and then creates the table.
$scope.setSheet = function() {

    var elementID = "shreadsheet-" + $scope.tabData.id;
    var element = document.getElementById(elementID);
    element.innerHTML = '';
    var readonlyArr = $scope.tabData.sheetHeaders.map(function() {
        return {readOnly : true};
    });
    var hot = new Handsontable(element, {
        data: Handsontable.helper.createSpreadsheetData(1000, 1000),
        colWidths: 47,
        rowHeaders: true,
        colHeaders: true
    });
};

I compiled this code using the following command I found in the docs at the Handsontable github page. 我使用在Handsontable github页面上的文档中找到的以下命令编译了此代码。

SheetController_work.js -o SheetController.js -r moment -r pikaday -r zeroclipboard -r numbro

Has anyone else experienced this problem on Google Chrome, or does anybody have any suggestions? 有没有其他人在Google Chrome上遇到此问题,或者有任何建议吗?

Thanks. 谢谢。

For me this problem magically went away. 对我来说,这个问题神奇地消失了。 The things that happened in the time that I noticed that this problem exists and the time that it magically fixed itself are as follows. 在我注意到此问题存在的时间以及它神奇地修复自身的时间中发生的事情如下。 You may want to try some of these if you experience this problem. 如果遇到此问题,您可能需要尝试其中的一些方法。

  • Restarted Computer (didn't work by itself) 重新启动计算机(本身无法工作)
  • Turned off localhost server from terminal and navigated to different directory. 从终端关闭本地主机服务器,并导航到其他目录。
  • Quit terminal. 退出终端。
  • Quit Google Chrome 退出谷歌浏览器

EDIT with proper solution 使用适当的解决方案进行编辑

I removed the paramater variableRowHeights: false and everything works now. 我删除了参数variableRowHeights: false ,现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM