Edit in Datasheet causes IE to crash – Problem Solved 3

Ran into a very strange “perfect storm” type of error in SharePoint tonight. When a custom master page is applied, editing a list in Datasheet View causes IE to just hang. The thread goes bananas and you have to fight with Task Manager to kill the process. I’m not sure I completely understand WHY this problem occurs, but I do have a pretty good idea how to fix it.

Turns out you won’t see the problem unless some very specific scenarios are in place. If the custom master page has a DocType declared (which they all should) AND the parent HTML objects that contain PlaceHolderMain have ANY bottom padding applied OR there are any elements below the PlaceHolderMain inside of the same parent object (like a footer or Table cells) then for whatever reason the JavaScript that runs the Datasheet View gets confused and jumps into an infinite loop.

If you run into this problem, you have basically two options:

  1. You can methodically remove all bottom padding or objects below the PlaceHolderMain -OR-
  2. Add some overriding JavaScript to the master page that will correct the offending function.


I spent a LONG time studying this problem before this link helped me figure out what is going on:


I think getting rid of all the bottom padding and lower objects is a better solution, but I could imagine there could be instances where its not possible. In those cases, here is the JavaScript that can fix the problem. Make sure to place it after core.js in your master page:

3 thoughts on “Edit in Datasheet causes IE to crash – Problem Solved

  1. Reply Ruslan Jigouline Oct 29,2009 2:38 pm

    Thanks for providing this fix.

    It definitely helps, but unfortunatly i am still running into a problem. I am using the “Edit in Datasheet” functionality under the “Actions” drop-down in a list (not the datasheet view) and it seems to work after applying the java script fix mentioned above, as long as i am signed in with SCA permissions. When i access the same list with a user ID that has “Full control” permission, IE hangs. Any suggestions?

  2. Reply milan Mar 31,2010 2:57 pm

    Umm, the problem has a much simpler solution. just add the following to your stylesheet:

    .ms-bodyareaframe object {width:100%!important; height:auto!important;}

    obviously making sure that your table or div holding the page content has the .ms-bodyareaframe class applied.

  3. Reply Randy Drisgill Mar 31,2010 3:37 pm

    I’ll have to try that next time Milan, hopefully you are right. That is much easier.

Leave a Reply