I had the same problem with dialogs scrolling out of view in scrollable page, or appearing outside the visible area of page. Thanks Jarry and Robert for this code and solution.
I had an issue with the shadow position after dialog open with this code but calling the move before open fixed it for me. So if you used to open dialog with:
$('#dlg').dialog('open');
After using dialog('fixed') you should change it to :
$('#dlg').dialog('move');
$('#dlg').dialog('open');
After these changes I also have had problems that the dialog sometimes disappears totally when opening it multiple times. It have never happaned before this fixed position change. This does not happen always and I cannot figure out how to reproduce it... :-( Have you noticed anything like this?
Also this fixed position breaks modal dialogs. Modals show ok but they allow you to scroll down from the dimmed area and outside the dimmed area you can still interact with the page. I guess possible solutions to this would be to make the dimmer cover whole page or to prevent from scrolling when modal dialog is open. Does any of you have this already implemented?
Please add the fixed position functionality to standard easyui in the future! Thanks!