removePopup method not valid for ie7, ie8
jcfiala - June 24, 2009 - 14:21
| Project: | Popups API (Ajax Dialogs) |
| Version: | 6.x-2.0-alpha5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jcfiala |
| Status: | closed |
Description
The removePopup method in popups.js uses Array.indexOf, which is not a standard Javascript method, for all that it does work in Firefox. As such, it doesn't work in ie7 or ie8.
I tried adding the indexOf method to the array object, but ran into a problem with FCKEditor, which defines an (uppercase) IndexOf method, which apparently clashes somehow.
I ended up defining a simple function, array_indexof, which I added to the top of the file. This fixes the problem with ie7, ie8.
I'm working on creating a patch file and will respond with it.

#1
And... here's that patch. You may want to move the function somewhere else, I put it at the top so as to make it easier to find. I ended up naming it arrayIndexOf because that seems to be more standard for Javascript function names.
#2
After installing this patch, the removePopup doesn't seem to work at all (in any browser). Firefox shows this error:
Popups.popupStack.arrayIndexOf is not a function
Line 626 of popups.js
A little confusing because I can see that function! Is this my mistake?
#3
Attached is a revised patch. The original patch was declaring a function but trying to call a method. Now it declared and calls the function.
BrandTim
#4
Thanks BrandTim,
tested and it's working fine now across browsers (tested IE6 - 8, FF3, SF3)
#5
Worked for us as well.
#6
Is working for me, solved an issue with forms in a popup not being submitted in IE7.
#7
Nice job! #3 Fixed the issue! @:)
Thanks!
#8
+1 here too...
We have a similar fix, but this solution makes more sense...
#9
Another happy customer! Patch from #3 works great...
#10
Fixed in 6.x-2.x-dev, see #419974: overlay won't disappear on IE6, errors saying that method is not valid for object
#11
Automatically closed -- issue fixed for 2 weeks with no activity.