Opened 17 years ago
Closed 17 years ago
#1666 closed Bug (fixed)
Domain relaxation not working for sub-menues
Reported by: | Martin Kou | Owned by: | Martin Kou |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6 |
Component: | General | Version: | SVN (FCKeditor) - Retired |
Keywords: | Confirmed IE Review+ | Cc: |
Description
Steps to reproduce the bug:
- Make sample01.html accessible through both "www.fckeditor.local" and "fckeditor.local", change the hosts file if needed.
- Add the following line to sample01.html before creating the oFCKeditor object:
document.domain = 'fckeditor.local' ;
- Open sample01.html from www.fckeditor.local in IE.
- Create an empty table.
- Right click on the table.
- Error: Permission denied.
Tracing the script execution shows the error comes from the creation of sub-menus in the table menu.
Attachments (1)
Change History (9)
comment:1 Changed 17 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
comment:2 Changed 17 years ago by
comment:3 Changed 17 years ago by
The issue occurs in IE6 only. Submenu works in IE7 in domain relaxation mode.
comment:4 Changed 17 years ago by
The error comes from fckpanel.js, at the final line of the following code segment:
// document inside of it, and the set the proper domain for it. (#123) if ( FCK_IS_CUSTOM_DOMAIN ) document.domain = FCK_ORIGINAL_DOMAIN ; // Create the Popup that will hold the panel. this._Popup = this._Window.createPopup() ; oDocument = this.Document = this._Popup.document ; ]}} Apparently the document.domain line above was not working. It worked in the initial round of creating panels and the first menu, but it didn't work when submenus need to be created later. There seems to be no way around this. I've tried to hack around it for a while but nothing worked. For fixing this we might have to revert to using iframes as floating panels in IE.
comment:5 Changed 17 years ago by
Found a little bit more today.
When the submenus are being created, the call to "new FCKPanel" results in a this._Window different from the window. And so modifying document.domain before this._Window.createPopup() has no effect.
Trying to modify this._Window.document.domain gives me another permission denied error, unfortunately.
comment:6 Changed 17 years ago by
Keywords: | Review? added |
---|
Finally found a fix to this weird bug. The fix is very weird, but it works.
Changed 17 years ago by
Attachment: | 1666.patch added |
---|
comment:8 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [1686].
Click here for more info about our SVN system.
I've tested now in IE7 and it seems to work for me (following the steps), the only problem is that the submenus aren't placed correctly at the right side of the main menu, but that's an old bug IIRC.