Language from an iframe

Page: 1

Author Post
Member
Registered: Oct 2017
Posts: 35
This is sort of a fringe case, but I actually did run into it in real life. I wouldn't label it a "bug," but rather a reflection of how browser security works. I suspect there's no way around it, but figured I'd toss it out here anyway.

Here's a simple Floatbox page that specifies de as the language. As expected, the close button is labeled Schlie├čen.

<admin>link removed</admin>

But now here's a page that places that page in an iframe:

<admin>link removed</admin>

Now the close button is labeled Close.

Had me momentarily puzzled, but the console tells the story - it's a cross-domain security problem. It can't open the de language file. Other fbOptions.js settings work fine, and there's no problem if the calling page is on the same domain as the iframed page.

Any known workaround?
« Last edit by admin on Mon Feb 19, 2018 2:21 pm. »
Administrator
Registered: Aug 2008
Posts: 3381
Good catch. Yup, it's a bug. I've posted 7.5.2 which fixes it.

From the change log...
Quote
-- When loaded in a cross-domain iframe, Floatbox would throw a non-fatal security error trying to access the parent Window.
-- After throwing the above error, the fb.require API function would be unable to execute callbacks.
-- If a language other than 'en' was set, that other language would fail to load in a cross-domain iframe due to reliance on the inoperative fb.require function callback.
Member
Registered: Oct 2017
Posts: 35
Just dumb luck that I stumbled across it. The fix looks solid. :)

Thanks!

(Demo pages removed, so please delete the links from my post.)

Page: 1