cancel
Showing results for 
Search instead for 
Did you mean: 

Share in an IFrame on IE8 - JS errors

groberts
Champ on-the-rise
Champ on-the-rise
I've read several issues here about the Share repository shown in an <strong>IFrame</strong> on <strong>IE8</strong> ,  but still have a problem that I have been stuck with for days.  (I am stuck with IE8 too because of client requirements)

If I view the exact same page, http://some.alfresco.site/share/page/repository,  without an IFrame, but with the same server/browser stack (Alfresco 4.2-c) it all works,  however inside an IFrame I get a JS error in;

share/js/forms-runtime.js at line 1426


errorFieldId = document.activeElement.id || null


which I guess means that document.activeElement is null

Anyone know why document.activeElement would be null in an IFrame ?

From the user's point of view, the effect is that she suddenly can no longer click on a folder to open it.  Oddly, it works for a while and then stops working.

The outer and inner page do not interact once the IFrame is rendered, so I don't think its anything to do with different domains.

Could it be connected with the HistoryManager working in an IFrame ?  I ask this because comparing the two outputs from log4javascript,  the working outputs this


HistoryManager: filter changed:path …….


while the IFrame version is silent, as if the call is not made.

(Could it be related to http://forums.alfresco.com/forum/end-user-discussions/alfresco-share/alfresco-cant-load-document-lib... ?)
Thanks.
1 REPLY 1

groberts
Champ on-the-rise
Champ on-the-rise
Fairly sure I've solved this by stopping the call to YAHOO.util.History.getCurrentState in documentlist.js.

I noticed that it worked the first time a space full of folders was displayed,  but subsequent refreshes of the document list left the space links unclickable.  So I've arranged for it to do what it normally does the first time,  every time.

Not sure yet if there are any bad side effects or how it works on other browser.

I changed this (document_list.js in onChangeFilter: function DL_onChangeFilter(layer, args)


            // Initial navigation won't fire the History event
            if (obj.doclistFirstTimeNav)
            {
               this._updateDocList.call(this,
               {
                  filter: filter,
                  page: this.currentPage
               });
            }
            else
            {
               if (this.options.usePagination)
               {
                  this.currentPage = 1;
                  objNav.page = "1";
               }

               Alfresco.logger.debug("D L_onChangeFilter: objNav = ", objNav);

               // Do we think the history state will change?
               if (this.options.highlightFile && objNav.filter === YAHOO.util.History.getCurrentState("filter"))
               {
                  Alfresco.logger.debug("Here3");
                  YAHOO.Bubbling.fire("highlightFile",
                  {
                     fileName: this.options.highlightFile
                  });
               }

               YAHOO.util.History.multiNavigate(objNav);
            }
         }



to just this



               this._updateDocList.call(this,
               {
                  filter: filter,
                  page: this.currentPage
               });


The log4jJavascript debugger was very helpful in tracing what happened when it worked and when it didn't.