extjs 4.1页面在行更新时滚动到Internet Explorer中的网格顶部 [英] extjs 4.1 page scrolls to top of grid in internet explorer on row update

查看:105
本文介绍了extjs 4.1页面在行更新时滚动到Internet Explorer中的网格顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网格上,我正在使用行编辑.

On my grid i'm using rowediting.

如果使用Internet Explorer 10(可能还有其他版本)并且页面具有滚动条

if using Internet explorer 10 ( probably the other versions too ) and the page has scrollbars

当我编辑一行并单击更新"时,页面将向上滚动到网格的开始.

When i edit a row and click "update" the page scrolls up to the start of the grid.

关于此问题的详细记录(尽管不是专门针对4.1的).

This issue is quite well documented on ( though not specifically on 4.1 ).

我已经看到修复了像这样覆盖rowModel的问题

I've seen fixed that override rowModel like this

Ext.override(Ext.selection.RowModel, {
    onRowMouseDown: function(view, record, item, index, e) {
//        view.el.focus();
        this.selectWithEvent(record, e);
    }
}); 

我还看到了将以下内容添加到网格中.

I've also seen adding the following to the grid.

selModel: Ext.create('Ext.selection.Model', { listeners: {} }),

这些选项都不适合我.

  • 编辑*

我尝试了以下建议的"preserveScrollOnRefresh:true".但是问题仍然存在.我在Dropbox上举了一个例子.要在Internet Explorer中重新创建它,您将需要最小化浏览器并单击/编辑,因为项目需要网格的页脚.

I've tried "preserveScrollOnRefresh: true" as suggested below. But the issue still remains. I've put an example on dropbox. To recreate this in internet explorer you will need to minimize the browser and click/edit on for items need the footer of the grid.

https://www.dropbox.com/s/l50d12t3cjq8kef/scrolling.htm

推荐答案

标准功能对我有用:

Ext.define('My.Grid', {
    extend: 'Ext.grid.Panel',

    viewConfig: {
        preserveScrollOnRefresh: true
    }
});

这篇关于extjs 4.1页面在行更新时滚动到Internet Explorer中的网格顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆