:: Forum >>

Undesired sort-behaviour in grid 2.5.3 with IE

Hello,

if the IE window's height is less than the grid, the focus jumps to middle of the grid upon clicking on the grid header (for sort purposes):

<html>

<head>
<link rel="stylesheet" type="text/css" href="./runtime/styles/xp/aw.css"></link>
<script src="./runtime/lib/aw.js"></script>
</head>

<body>
<script>
var obj=new AW.UI.Grid

var myCells=[[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[13],[14],[15],[16],[17],[18],[19],[20],[21]]

obj.setColumnCount(1)
obj.setRowCount(21)
obj.setControlSize(400,406)
obj.setCellData(myCells)

document.write(obj)
</script>
</body>

</html>


This behaviour doesn't occur in Mozilla Firefox at all. With Firefox the focus remains on the grid's header - which is the desired behaviour.

This bug has been described before, but hasn't been fixed 100%:

http://www.activewidgets.com/javascript.forum.22535.4/strange-onmouseoverheader-after-sortchange-behaviour.html


Thank you in advance for you assistance!
catdxm
Tuesday, February 24, 2009
Hello,

does anyone have a suggestion how to approach this tricky issue? For my project, this is a no-go for upgrading to 2.5.3!

Thank you in advance for any kind of reply.

Best regards,

Michael
catdxm
Monday, March 2, 2009
Do you mean that the page scrolls to make grid visible? If this is the problem then you may read the scroll offset and restore it later.

The grid must receive a focus anyway. The grid will not run any actions unless it has keyboard focus (this is by design).
Alex (ActiveWidgets)
Monday, March 2, 2009
This faulty behaviour occurs only in IE. Mozillla Firefox is OK!

The problem occurs only if the IE browser window is less high than the grid (vertical IE scrollbar appears). Upon clicking two times in a row on the colum header for sorting purposes, the IE automatically jumps to the vertical middle of the page/the grid. This is an undesired behaviour, Firefox works as desired.

Thank you in advance for your reply.
catdxm
Tuesday, March 10, 2009
Hello all,

did anybody check my code with IE and Firefox? There ought to be a workaround.

Thank you for any kind of reply
catdxm
Friday, March 13, 2009
Hello everybody,

can anybody at least reproduce the behaviour described in this thread. There's possibly something really wrong about how I try to tackle this problem.

Thank you
catdxm
Tuesday, March 17, 2009
any ideas?
catdxm
Monday, March 23, 2009
Hello folks,

can anybody please try to reproduce the behaviour described and confirm/confute my description? It's easy: Just make the IE window less high than the ActiveWidgets grid itself and click twice on the grid header for sort purposes.

I'm grateful for ANY reply - positive or negative!
catdxm
Friday, March 27, 2009
Unfortunately this is 'normal' and expected behavior in IE. The browser scrolls the page when the focus moves from one element to another to make the focused element visible inside the viewport (in your case the focus moves from the header back to the internal grid focus element in the top of the grid after the refresh). In general this is the correct behavior but I agree that it does not look good in this particular case. If you want to block it you should attach the event handler to the page onscroll event and restore the scroll offset after the event.
Alex (ActiveWidgets)
Saturday, March 28, 2009
Hi Alex,

thank you very much for responding to my last posting and confirming and explaining the IE behaviour.

Could you please provide some sample code to explain implementing your workaround? How can I attach the event handler to the page onscroll event??? I'm sorry for being at my JavaScript wits' end, here ;-)

I'd really like to take advantage of the increased performance & new features and switch to ActiveWidgets 2.5.3.

Thank you in advance,
catdxm
Tuesday, April 14, 2009
Hello all,

does anybody have a new ideas how to "attach the event handler to the page onscroll event"?

Thank you in advance for your support.

catdxm
Wednesday, July 1, 2009

This topic is archived.


Back to support forum

Forum search