Scrolling in grid in Firefox causes the whole page to scroll to the top
I have a grid at the bottom of a page. You have to scroll the page down to see the whole grid. When you scroll up or down in the grid, the whole page scrolls to the top. It's almost like the whole page got a refresh or something. The grid still scrolls, but you have to scroll back down to the grid in the page to see it.
This seems to work fine in IE, but not FireFox. Any suggestions?
Maggie M
September 5,
I noticed this too. Did you find a work around?
Michael Klocker
September 8,
No I haven't been able to find a fix for it yet. The grid example on the main page of ActiveWidgets doesn't have the same issue. I don't know if that's because that uses iframes where I'm using div tags.
Maggie M
September 11,
The only thing I've found out so far, is that it seems that when I scroll in the grid that in Firefox it's also doing a window.onscroll but in IE it doesn't do a window.onscroll. I'm going to look at the eventhandlers and see if I can figure something out in there.
Maggie M
September 12,
Yes, I can reproduce this and somehow this problem is related to the virtual mode (rows refresh) and not the scrolling itself. For small grids it can be fixed with setVirtualMode(false).
I'll keep looking for the correct solution.
Alex (ActiveWidgets)
September 12,
I poked around in the rows.js and think it has to do with the section...
obj.refresh=function(){
try{
if(this.$owner.$active){
var e=this.$owner.getContent("focus").element();
if(AW.ie){
var r=document.body.createTextRange();
r.moveToElementText(e);
r.select();
r=null
}
e.focus();
e=null
}
}
catch(err){}
if(typeof(this.$0)=="undefined" && this.$owner.$extended){
for(var i=0;i<3;i++){
_super.refresh.call(this.$owner.getRowsTemplate(i))
}
}
else{_super.refresh.call(this)}
}
I think it's not finding the "e" element. If I comment out e.focus(), the whole page in Firefox doesn't try to scroll to the top. But I don't want to leave it that way in case it messes up something else.
Maggie M
September 12,
Seems like if I just comment out e.focus(), that I get weird flickering (trying to still load the grid) behaviour. Instead I did the following...
if(this.$owner.$active){
var e=this.$owner.getContent("focus").element();
if((e!='')&&(e!="undefined")&&(e!=null)){
if(AW.ie){
var r=document.body.createTextRange();
r.moveToElementText(e);
r.select();
r=null
}
e.focus()
} else {
this.focus()
}
e=null
}
Not sure if this is correct, but seems to solve the issues I was having with scrolling in Firefox.
Maggie M
September 13,
I take that back...don't need the else { this.focus() }
darn caching :)
The flickering issues were already there prior to me changing any aw code. I think that has to do with me including images in the grid not by the AW.Templates.Image, but by using img tags since I needed tooltips and click thrus for those images.
Maggie M
September 13,
is there a fix to this yet? i tried comenting out the e.focus() and it still does not work on me. thanks
heidit
January 5,
Alex (ActiveWidgets)
January 5,