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

jcfiala - June 24, 2009 - 14:30

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.

AttachmentSize
popups-500902.patch 1.3 KB

#2

drupal_jon - July 1, 2009 - 16:41

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

BrandTim - July 2, 2009 - 03:39
Status:active» needs review

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

AttachmentSize
popups-500902-2.patch 1.3 KB

#4

drupal_jon - July 2, 2009 - 13:29

Thanks BrandTim,

tested and it's working fine now across browsers (tested IE6 - 8, FF3, SF3)

#5

sirkitree - July 20, 2009 - 19:40
Status:needs review» reviewed & tested by the community

Worked for us as well.

#6

muhleder - August 6, 2009 - 14:15

Is working for me, solved an issue with forms in a popup not being submitted in IE7.

#7

aleagi - August 20, 2009 - 16:41

Nice job! #3 Fixed the issue! @:)

Thanks!

#8

blakehall - September 1, 2009 - 22:30

+1 here too...

We have a similar fix, but this solution makes more sense...

#9

noahb - September 29, 2009 - 22:44

Another happy customer! Patch from #3 works great...

#10

longwave - November 11, 2009 - 16:41
Status:reviewed & tested by the community» fixed

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

System Message - November 25, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.