jquery ui modal dialog problems in IE
I use jquery ui dialog widget. Everything works fine in FF, Opera etc., except IE. The problem is that when dialog is opened in Internet Explorer, some space (not covered with that "modal gray layer") is added at the bottom of the document, and page is scrolled to the bottom. So I don't even see the dialog, I have to scroll up, to see it fully.
开发者_StackOverflowAnyone had that problems? Any solutions?
EDIT: now I see, that this "bottom space" is also added in FireFox, but it doesn't scroll to it like in IE.
I found out what was wrong. That dialog (and everyone else) had CSS style:
position: relative;
and therefore occupied space at the bottom of the document (where it is added).
The strange thing is, this style comes directly from jquery-ui-1.7.2.custom.css file, which I downloaded from jquery site without altering.
So I used more specific (i.e. higher priority selector) to assign absolute positioning:
position: absolute;
It may be jquery-ui bug or me using it wrong or not getting something. But it's quite obvious that "top" (global) dialog box appended to body element should be positioned in absolute manner.
This happens because somehow the IE resets the dialog height at definition.
If you are defining the uidialog height in definition, the same ht has to be redefined for the css, within the same code block
$mydlg.css('height',dlgH);
This worked for me, you can try.
精彩评论