SharePoint Products > SharePoint 2010 Forums > SharePoint 2010 - Setup, Upgrade, Administration and Operation > SharePoint 2010 dialogs with rich-text controls don't work in IE9

Answered SharePoint 2010 dialogs with rich-text controls don't work in IE9

  • Thursday, July 21, 2011 9:52 PM
     
     

    I've discovered that dialogs that contain rich-text edit controls do not work at all in IE9.  For example, Adding an item to a task list or an event to a calendar.  The rich-text control for the description appears disabled, and the save buttons (either at the bottom or in the ribbon) do nothing.

    Here are the errors that are being generated:

    SCRIPT5002: Function expected
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 14370
    SCRIPT5002: Function expected
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 14370
    SCRIPT5007: Unable to get value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48295
    SCRIPT5007: Unable to set value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48438
    SCRIPT5007: Unable to get value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48295
    SCRIPT5007: Unable to set value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48438
    SCRIPT5007: Unable to get value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48295
    SCRIPT5007: Unable to set value of the property 'hoverButton': object is null or undefined
    form.js?rev=1303V4v3piUyT%2FTVo3EaTw%3D%3D, line 2 character 48438

     


Answers

  • Friday, July 22, 2011 12:14 AM
     
     Answered

    I figured out the issue.

    We changed the X-UA-Compatible setting in our masterpage from IE=8 to IE=Edge.  This seems to cause all kinds of issues with how SharePoint renders things in IE9.

    It's very frustrating and disappointing that SharePoint requires IE8 emulation, but now we will go back and change our masterpage and find all the places that displays are broken and fix them all.

    • Marked As Answer by Lane Galloway Friday, July 22, 2011 12:14 AM
    •  

All Replies

  • Friday, July 22, 2011 12:14 AM
     
     Answered

    I figured out the issue.

    We changed the X-UA-Compatible setting in our masterpage from IE=8 to IE=Edge.  This seems to cause all kinds of issues with how SharePoint renders things in IE9.

    It's very frustrating and disappointing that SharePoint requires IE8 emulation, but now we will go back and change our masterpage and find all the places that displays are broken and fix them all.

    • Marked As Answer by Lane Galloway Friday, July 22, 2011 12:14 AM
    •  
  • Monday, March 12, 2012 8:54 PM
     
     
    Did you ever find a fix to make things work with IE=Edge?

    Matt Olson, MS Content Development Specialist MCITP, MCTS

  • Monday, March 12, 2012 9:01 PM
     
     
    No.  We've left the IE=8 setting and haven't made any further attempts to get it working with IE=Edge.
  • Thursday, March 22, 2012 8:57 PM
     
     Proposed Answer Has Code

    I was able to work off of a helpful post I found when trying to fix this problem, and make it work. The helpful gentleman got me started, but didn't spill all of the beans.  I'm prepared to spill however.

    NOTE:  This is a hack.  I have to assume it will break when we upgrade SharePoint....ut it works, so I'll use it.  :-)

    Add this to the head of your Masterpage AFTER the call to form.js (if there) or core.js.  Probably safest to just put it before the cloase of the </head>...

    <script type="text/javascript">
        ExecuteOrDelayUntilScriptLoaded(function () {
            document.write('<script type="text/javascript" src="/path/to/your/file/location/form.ie9fix.js"></' + 'script>');
        }, 'form.js');
    </script> 


    This loads your Javascript file after SharePoint's form.js is loaded. 


    Now, create your javascript file that you are referencing in the path above...here are the contents:

    function RTE_DD_GetMenuFrame()
    	{
    		var ifmMenu=null;
    		var elemMenu=RTE_DD_GetMenuElement();
    		if (null !=elemMenu)
    		{
    			if (document.frames.length > 0)
    			{
    				ifmMenu=document.frames[g_strRTETextEditorPullDownMenuID];
    			}
    			else
    			{
    				if ((document.parentWindow !=null) && (document.parentWindow.frames !=null))
    				{
    					ifmMenu=document.parentWindow.parent.document.frames[g_strRTETextEditorPullDownMenuID];
    				}
    			}
    		}
    		if (null==ifmMenu)
    		{
    			if (g_fRTEFirstCallToGetMenu)
    			{
    				g_fRTEFirstCallToGetMenu=false;
    				return null;
    			}
    		}
    		return ifmMenu;
    	}
    
    	function RTE_GetEditorIFrame(strBaseElementID)
    	{
    		var ifmEditor=null;
    		var doc=document;
    		if ((null !=doc.frames) && (doc.frames.length==0) && (doc.parentWindow.parent !=null))
    		{
    			doc=doc.parentWindow.parent.document;
    		}
    		if ((null !=doc.frames) && (doc.frames.length > 0))
    		{
    			var ifmContainer=doc.getElementById(RTE_GetEditorIFrameID(strBaseElementID));
    			if (ifmContainer !=null)
    			{
    				ifmEditor=doc.frames[RTE_GetEditorIFrameID(strBaseElementID)];
    			}
    		}
    		return ifmEditor;
    	}

    Now, you can set your master to IE=Edge I suppose, I know in IE9 now you'll see and be able to use the Rich Text control



    • Edited by DJ Monzyk Thursday, March 22, 2012 8:59 PM Added Summary
    • Proposed As Answer by M_Olson Friday, March 23, 2012 12:51 AM
    •  
  • Friday, March 23, 2012 3:21 PM
     
     

    Thanks DJ, this may well work, but it is not a change we are prepared to make on our critical business system.  The original issue came up while we were still in development, but now that we are in production, and all the existing functionality is in use, we are not going to try a hack to support IE=Edge.

    But again, thanks for posting this.  I am sure it will help a lot of other folks.