[
http://jira.jboss.com/jira/browse/JBSEAM-1319?page=comments#action_12362169 ]
Chris Sweeney commented on JBSEAM-1319:
---------------------------------------
Another issue has shown up with regards to s:selectDate and rich:modalPanel. The modal
panel is positioned absolutely, and s:selectDate is positioned relatively. This means that
s:selectDate does not always popup where expected, and it scrolls with the underlying page
while the modalPanel does not. The current behavior is correct for when the underlying
content is non-modal.
I've observed this on Mac OS X, 10.4.9, using Firefox 2.0.0.3. (But I expect it to be
true for most OS/Browser combinations). I don't (yet) have a solution...
s:selectDate does not work on rich:modalPanel
---------------------------------------------
Key: JBSEAM-1319
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1319
Project: JBoss Seam
Issue Type: Bug
Environment: OS: Mac OS X, Windows 2000 Pro
Browser: Firefox, IE
Reporter: Chris Sweeney
Assigned To: Shane Bryzak
Fix For: 1.3.0.BETA1
If s:selectDate is used on a rich:modalPanel, it does not appear when the icon is
clicked. This is because the z-index for the calendar div is not set. I have a patch
(included below) to /org/jboss/seam/ui/resource/date/calendar.js (contained within
jboss-seam-ui.jar). The patch is not as elegant as I would have liked - I would have
preferred to navigate up the DOM tree from the target element and set the z-index based on
where the target element lived. Unfortunately, my efforts at doing so have been
unsuccessful.
Tested on:
Mac OS X 10.4.9, Firefox version Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3Mozilla/5.0 (Macintosh; U; Intel Mac OS X;
en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Windows 2000 Pro, IE 6.0.2800.1106, SP1, Q823353
Windows 2000 Pro, Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12)
Gecko/20050915 Firefox/1.0.7
Note: rich:modalPanel doesn't work on Safari (yet), so no way to test...
__Calendar.prototype.popup = function (locX, locY)
{
var selectedDate = __calendarFactory.parseDateValue(getObject(this.name).value);
if (selectedDate)
{
this.selectedMonth = selectedDate.getMonth() + 1;
this.selectedYear = selectedDate.getFullYear();
}
this.isPopup = true;
__calendarFactory.documentmousedown = document.onmousedown;
var popupDiv = getObject(POPUP_DIV);
if (!popupDiv)
{
popupDiv = document.createElement('div');
popupDiv.id = POPUP_DIV;
popupDiv.style.position = "absolute";
window.document.body.appendChild(popupDiv)
}
popupDiv.className = this.styleClass;
getStyleObject(POPUP_DIV).left = locX + "px";
getStyleObject(POPUP_DIV).top = locY + "px";
/*BEGIN PATCH - set zIndex... C. Sweeney, May 10, 2007 */
var all_divs = document.getElementsByTagName("div");
var maxZIndex = 0;
for(i = 0; i < all_divs.length; i++){
if(all_divs[i].id && all_divs[i].id != ""){
var divStyle = getStyleObject(all_divs[i].id);
if(divStyle && divStyle.zIndex && divStyle.zIndex >
maxZIndex){
maxZIndex = divStyle.zIndex;
}
}
}
getStyleObject(POPUP_DIV).zIndex = maxZIndex + 1;
/* END PATCH */
popupDiv.innerHTML = this.getHTML();
changeObjectVisibility(POPUP_DIV, "visible");
document.onmousedown = this.documentmousedown;
popupDiv.onmousedown = this.mousedown;
popupDiv.onmouseup = this.mouseup;
};
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira