You aren't the first person to come across this bug in Firefox. Although technically the maximum z-index is a lot higher than 10,000, FireFox starts to behave incorrectly.
Your best bet is to reduce your z-index on both items to help firefox out at this stage (you may notice it works fine in IE)
But the z index of AjaxToolKit modal pop up is 10000. So if we want to show any message above the this we need to det the zindex more than that.
Even though we can reduce the zindex of the pop up by modifying theModalPopupBehavior.js.But it will not be the permanent solution. Since we need to do it for every new release of the toolkit.
Is it possible to provide zindex as the property of the modal pop up or the zindex value can be reduced to 7000.
Concerned people plesae look at this issue.
Thanks for your support.
For what it's worth, when I looked at the modalpopup demo, the z-index of the modal popup box was only 2... but if you need to change them via script you can attach a script to your page via the scripmanager's Scripts collection.
In there, put something like the following (made simple, and covers for more than one modal popup control):
function pageLoad(){ var divs = document.getElementsByTagName("DIV");for (var i=0;iif(div.style.zIndex > 10000)// do some logic to figure out what it really should be }}
z-index of the modal pop up is 10000. I have verified it in the code. Where did you seen it as 2.?
for ur reference please find the code below, which taken from theModalPopupBehavior.js
this._backgroundElement.style.zIndex = 10000;
if (this._BackgroundCssClass) {
this._backgroundElestyle.zIndexment.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;
When I changed the z index to 5000. andthis._foregroundElement to 5001.
Its working fine now.
I looked at the live DOM of the modal popup control that is demo'd over at the ajax.asp.net/toolkit demos using IE dev toolbar, it said it was 2. Perhaps they are using an older version there or else have done something to modify it. Or perhaps the debug version doesn't match the release version of the script. I don't know the answer, but I'm glad you found yours.
Paul
No Paul,
I have checked in both code and DOM using IEDev ( I am using AjaxControlToolKit 1.0.10618.0 version ).
zindex above 10000 are work fine in Firefox too.
The problem was due the$common.getCurrentStyle(this._backgroundElement, 'zIndex', this._backgroundElement.style.zIndex) + 1;
instruction in the ModalBehaviour.js file. Which is used to get the zindex of the background element., whichh is intrepreted diffrently in IE and Firefox.
When I removed this line, instead hardcoded the pop up value to 10001, its working fine.
No comments:
Post a Comment