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:

You can methodically remove all bottom padding or objects below the PlaceHolderMain -OR-

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”

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?