html - Angular slickgrid page moves up on click any cell
问题描述
I am using Angular slickgrid to display my data, issue is when we click on any cell, row or checkbox, page moves up to starting element. Instead of moveing up page should stay as it is.
From DOM I found active element is '<div tabindex="0" hidefocus="" style="position:fixed;width:0;height:0;top:0;left:0;outline:0;"></div>'
When I delete above line, then it stop moving page up on click on any cell and working properly as per proper behaviour.
Here is my code:
<section id="order-grid">
<div class="row">
<div class="col-12" id="demo-container">
<angular-slickgrid #slickGrid [gridId]="orderGrid" (onAngularGridCreated)="angularGridReady($event)"
[columnDefinitions]="orderTableColumns" [gridOptions]="orderGridOptions" [dataset]="orderItems"
(sgOnClick)="onCellClicked($event.detail.eventData, $event.detail.args)"
(sgOnCellChange)="onCellChanged($event.detail.eventData, $event.detail.args)">
</angular-slickgrid>
</div>
</div>
</section>
Grid options are:
this.orderGridOptions = {
asyncEditorLoading: true,
autoCommitEdit: true,
autoResize: {
containerId: 'demo-container',
sidePadding: 15
},
enableAutoResize: true,
editable: true,
enableCellNavigation: true,
enableFiltering: true,
enableRowSelection: true,
rowSelectionOptions: {
selectActiveRow: true
},
};
here is link for behaviour: https://app.box.com/s/gwoks1buvncz8q6bebd2t0bym4tf1tw7
I would appreciated when you give me some solution why this is happens
解决方案
推荐阅读
- mysql - mysql存储过程删除和执行插入
- git - 尽管有 .gitattributes,Git 还是弄乱了行尾
- firebase - 根据闭包上下文的要求,返回类型“Transaction”不是“Future<_>”
- python - Python numpy 在给定位置将二维数组插入更大的二维数组
- python - Flask-Executor 和 Flask-SQLAlchemy:无法从执行器函数内部的数据库中获取更新的数据
- python - Flask:多字段 POST 请求
- python - 断开 3D 瀑布线图中的两条曲线
- c# - 如何在 C# 中实现保龄球游戏 kata 但没有 if 或 for 或任何迭代结构
- javascript - 使用 JavaScript 获取当前回历月份的最后日期
- oauth-2.0 - OAUTH 和 OIDC 在您需要在微服务网格上进行单点登录并且每一个都归同一家公司所有的场景中是否有意义?