Just tried using overlays in Safari 4.0.3 and am not having any luck. The overlay window pops open and the loader just spins and spins.

Errror: WRONG_DOCUMENT_ERR: DOM Exception 4

http://skitch.com/eojthebrave/nj768/localhost

Comments

mcrittenden’s picture

Subscribe. Problem was also reported in Chrome (though not sure which version), and I'm seeing it in Midori, so it seems to be a general WebKit thing.

carlos8f’s picture

Title: Overlay not working in Safari 4.0.3 » Overlay not working in WebKit browsers

I can confirm this issue with Chrome 3.0.195.33 and Safari 4.0.3 (Windows) and Safari 4.0.4 (Mac). Does seem to be general to WebKit.

gábor hojtsy’s picture

Status: Active » Needs review
StatusFileSize
new933 bytes

Ok, can reproduce. Applied a developer version of jQuery, so I could see that it actually has an error on line 957, where it tries to append a child to a document. With further debugging around that, I found that the problem is with the code that moves the shortcuts link around. It moves the elements from one document to another. Previously it used to do markup copying and removal of the original element, but that was later changed to just transfer the element. While that works in Firefox, it does not work in Webkit, so we need to transfer the markup, as is. Therefore I moved back to similar code that was used before to copy the markup and remove the original element in the iframe. Works for me on Safari.

gábor hojtsy’s picture

Note that ideally, we'd use outerHTML(), but that would need this to be added to drupal.js, which I believe we might be late to do given the code freeze. So I'm just copying the class and adding it on a div tag. Is not flexible for all kinds of theming obviously.

carlos8f’s picture

Status: Needs review » Reviewed & tested by the community

Nice patch, I can confirm it fixes Safari and Chrome. Gotcha on #4.

ksenzee’s picture

Status: Reviewed & tested by the community » Needs work

This could use a code comment, so it doesn't get changed back. I believe I changed it in the first place, and I'm quite capable of changing it again if I don't have a comment in there telling me not to. :)

gábor hojtsy’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB

Updated patch with comments.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

RTBC per #5

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Great! Committed to HEAD, thanks!

Status: Fixed » Closed (fixed)

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