Undesired sort-behaviour in grid 2.5.3 with IE


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):


  <link rel="stylesheet" type="text/css" href="./runtime/styles/xp/aw.css"></link>
  <script src="./runtime/lib/aw.js"></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]]




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%:


Thank you in advance for you assistance!
February 24,

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,

March 2,
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)
March 2,
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.
March 10,
Hello all,

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

Thank you for any kind of reply
March 13,
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
March 17,
any ideas?
March 23,
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!
March 27,
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)
March 28,
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,
April 14,
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.

July 1,

This topic is archived.

See also:

Back to support forum