PDA

View Full Version : DataView automatically scrolling up in IE?



gardhiwasam
15 Aug 2018, 2:57 PM
In Internet Explorer(tested with IE11), clicking on a dataview item will cause that item to automatically scroll to the top. To re-create the issue, paste the following code into ExtJS documentation fiddle (https://docs.sencha.com/extjs/6.0.2/classic/Ext.view.View.html), run the fiddle, scroll all the way to bottom, and then click on one of the images. This will cause the dataview to scroll up automatically. Is there any way I can stop this automatic scrolling ? This only happens in IE(the scroll position remains unaffected in FF and Chrome).

Ext.define('Image', {
extend: 'Ext.data.Model',
fields: [
{ name:'src', type:'string' },
{ name:'caption', type:'string' }
]
});

Ext.create('Ext.data.Store', {
id:'imagesStore',
model: 'Image',
data: [
{ src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts' },
{ src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data' },
{ src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme' },
{ src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned' }
]
});

var imageTpl = new Ext.XTemplate(
'<div class="abc">',
'<tpl for=".">',
'<div style="margin-bottom: 10px;" class="thumb-wrap">',
'<img src="{src}" />',
'<br/><span>{caption}</span>',
'</div>',
'</tpl>',
'</div>'
);

Ext.create('Ext.view.View', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.abc',
emptyText: 'No images available',
renderTo: Ext.getBody()
});

Forum_Adm
7 Sep 2018, 7:00 PM
Hi there- Sorry for the delay in responding. I have passed your question on to a team member who can help. I appreciate your patience!

pakumar
11 Sep 2018, 10:23 AM
Hello,

This is a bug and is in latest ExtJS 6.6.0 version as well. Thank you for reporting this.

Regards,
Pavan,
Sencha Support.