Jquery UI Dialog - when opened IE7 Browser moves instantly to the bottom of the page

Posted by Truegilly on Stack Overflow See other posts from Stack Overflow or by Truegilly
Published on 2010-05-31T19:42:17Z Indexed on 2010/05/31 19:43 UTC
Read the original article Hit count: 343

Filed under:

Hello,

i have been working on a new .net MVC site and have integrated some of the awesome jquery UI components.

ive been testing it in IE8, FF, opera and Chrome and all looks well. Once I test in IE7, surprisingly its the dialogs that are causing a problem.

basically what’s happening is that one you user clicks to open a dialog the page will scroll immediately to the bottom of the page. This is especially bad if the page is quite long.

this only happens in IE7 (and probably 6 but im not even going there!).

I have spend a few hours reading forums and it seems im not the only one.

I have created a dirty hack which im not keen on but it does work.

onclick="SignIn();  <% if(ModelHelperClass.CheckForOldIEVersion() == true) Response.Write("window.scrollTo(0, 0);"); %> return false;">

has anyone else had this issue and resolved it without resorting to dirty hacks ?

im using jquery-ui-1.8.custom.min.js and jquery-1.4.2.min.js

any help is most appreciated

Truegilly

© Stack Overflow or respective owner

Related posts about jquery-ui