tudorilisoi / ep_fullscreen

A fullscreen plugin for etherpad's ace editor, when in embedded/iframe mode
MIT License
0 stars 1 forks source link

IE throws error SCRIPT5: Access is denied #2

Open joergludwig opened 8 years ago

joergludwig commented 8 years ago

I set document.domain in my web page as requested by the README file to make fullscreen mode work with Chrome. When opening the web page in IE, I get the error SCRIPT5: Access is denied.

Problem turned out to be that etherpad-lite sets document.domain for Chrome but not for IE:

if ((!browser.msie) && (!(browser.firefox && browser.version.indexOf("1.8.") == 0))) { document.domain = document.domain; // for comet }

It is hard to debug the value of document.domain, as you always get the current domain, even if document.domain is undefined. But for two frames to be able to communicate both values have to be either undefined or set to the same value.

I did not want to reimplement the whole browser detection in my web page to decide, if a have to set the document.domain. Thus I removed all settings of document.domain from etherpad-lite. Fullscreen mode now runs flawlessly with Chrome, Firefox, Safari and Internet Explorer.

tudorilisoi commented 8 years ago

OK, thanks for the info. I'll link this in the README

joergludwig commented 8 years ago

You are welcome. :)