I found the problem and fixed it on my own.
Here the complete solution to get the modal popup working without Doctype:
Use umer_farooq80's fix to get Modal popup centered:
//Edit getClientBounds in Common.js
getClientBounds : function() {
/// <summary>
/// Gets the width and height of the browser client window (excluding scrollbars)
/// </summary>
/// <returns type="Sys.UI.Bounds">
/// Browser's client width and height
/// </returns>
var clientWidth;
var clientHeight;
switch(Sys.Browser.agent) {
case Sys.Browser.InternetExplorer:
if (document.documentElement && document.documentElement.clientWidth)
clientWidth = document.documentElement.clientWidth;
else if (document.body)
clientWidth = document.body.clientWidth;
//clientWidth = document.documentElement.clientWidth;
if (document.documentElement && document.documentElement.clientHeight)
clientHeight = document.documentElement.clientHeight;
else if (document.body)
clientHeight = document.body.clientHeight;
//clientHeight = document.documentElement.clientHeight;
break;
case Sys.Browser.Safari:
clientWidth = window.innerWidth;
clientHeight = window.innerHeight;
break;
case Sys.Browser.Opera:
clientWidth = Math.min(window.innerWidth, document.body.clientWidth);
clientHeight = Math.min(window.innerHeight, document.body.clientHeight);
break;
default: // Sys.Browser.Firefox, etc.
clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);
clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
break;
}
return new Sys.UI.Bounds(0, 0, clientWidth, clientHeight);
},
Then update initialize in ModalPopupBehavior.js (change 'fixed' to 'absolute'):
initialize : function() {
/// <
summary>
/// Initialize the behavior
/// </
summary>
/*
<
div superpopup - drag container resizable><
div -- drag handle\dropshadow foreground></
div></
div>
*/
AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(this, 'initialize');
this._isIE6 = (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7);
if(this._PopupDragHandleControlID)
this._dragHandleElement = $get(this._PopupDragHandleControlID);
this._popupElement = $get(this._PopupControlID);
if(this._DropShadow)
{
this._foregroundElement = document.createElement('div');
this._popupElement.parentNode.appendChild(this._foregroundElement);
this._foregroundElement.appendChild(this._popupElement);
}
else
{
this._foregroundElement = $get(this._PopupControlID);
}
this._backgroundElement = document.createElement('div');
this._backgroundElement.style.display = 'none';
this._backgroundElement.style.position = 'absolute';//'fixed';
this._backgroundElement.style.left = '0px';
this._backgroundElement.style.top = '0px';
// Want zIndex to big enough that the background sits above everything else
// CSS 2.1 defines no bounds for the <
integer> type, so pick arbitrarily
this._backgroundElement.style.zIndex = 10000;
if (this._BackgroundCssClass) {
this._backgroundElement.className = this._BackgroundCssClass;
}
this._foregroundElement.parentNode.appendChild(this._backgroundElement);
this._foregroundElement.style.display = 'none';
this._foregroundElement.style.position = 'fixed';
this._foregroundElement.style.zIndex = $common.getCurrentStyle(this._backgroundElement, 'zIndex', this._backgroundElement.style.zIndex) + 1;
this._showHandler = Function.createDelegate(this, this._onShow);
$addHandler(this.get_element(), 'click', this._showHandler);
if (this._OkControlID) {
this._okHandler = Function.createDelegate(this, this._onOk);
$addHandler($get(this._OkControlID), 'click', this._okHandler);
}
if (this._CancelControlID) {
this._cancelHandler = Function.createDelegate(this, this._onCancel);
$addHandler($get(this._CancelControlID), 'click', this._cancelHandler);
}
this._scrollHandler = Function.createDelegate(this, this._onLayout);
this._resizeHandler = Function.createDelegate(this, this._onLayout);
// Need to know when partial updates complete
this.registerPartialUpdateEvents();
},