Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: PopupControl Extender Top Position Issue - A Proposed Fix [27289]

$
0
0
When the extender's position is set to top, the entire popup doesn't appear above the target control. I have made a slight change in PopupControlBehavior.pre.js to getTopOffset function to fix this. Please see below. Note I had to temporarily set the display of popup element to inline so I will be able to retrieve the height. If the display is set to none, the offsetHeight returns 0.

_getTopOffset : function() {
/// <summary>
/// Get the top offset for the popup
/// </summary>
/// <returns type="Number" integer="true">
/// Top offset for the popup
/// </returns>

// Get the top offset for the popup
var yoffSet;
if(Sys.Extended.UI.PopupControlPopupPosition.Top == this._position) {
this._popupElement.style.display = 'inline';
yoffSet = (-1 * this._popupElement.offsetHeight) + this._offsetY;
this._popupElement.style.display = 'none';
} else if (Sys.Extended.UI.PopupControlPopupPosition.Bottom == this._position) {
yoffSet = this.get_element().offsetHeight + this._offsetY;
} else {
yoffSet = this._offsetY;
}

return yoffSet;
},
Comments: The problem is that the panel used for the popup is created dynamically. So, the size of the popup has to be determined in JS so that the position can be properly set.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>