Paul Liebrand's Weblog

Welcome to my blog mainly about SharePoint

Skip to: Content | Sidebar | Footer

Google Search
Custom Search

SharePoint 2010 Markup Style Bug

21 January, 2011 (07:02) | SharePoint | By: Paul Liebrand

We discovered a bug in SharePoint 2010 and the usage of the markup styles when you are editing a page.

MarkupStyles

To reproduce this issue, follow these instructions:

  • Create a new page
  • Click Markup Styles and select Heading 1
  • Type “Test 1” and press enter
  • Click Markup Styles and select Heading 2
  • Type “Test 2” and press enter
  • Click Markup Styles and select Heading 3
  • Type “Test 3” and press enter

If you did this correctly, you should see the following as the end result:

 FirstAttempt

On the surface, things may appear to be working correctly but lets take a closer look.  Click the HTML drop down and select Edit HTML Source.  You will quickly discover that the generated HTML is incorrect:

<h1 class="ms-rteElement-H1">Test 1</h1>
<h2 class="ms-rteElement-H2"><div>Test 2</div>
<h3 class="ms-rteElement-H3">Test 3&#160;</h3></h2>

Notice the H3 element is embedded within the H2 element causing the style of H3 to be different.

Go ahead and clear all the HTML and click OK. The follow the steps outlined above again but instead of pressing enter right away wait for 2-3 seconds before hitting it. You will also notice the blinking cursor will “pause” after typing. When you see it start blinking again it is safe to hit enter.

If you did this correctly, you should see the following as the end result:

SecondAttempt

You will notice that the style of “Heading 3” is different that during the first attempt.  If we examine the generated HTML, you will notice it is now correct:

<h1 class="ms-rteElement-H1">Heading 1</h1>
<h2 class="ms-rteElement-H2">Heading 2</h2>
<h3 class="ms-rteElement-H3">Heading 3&#160;</h3>

We contacted Microsoft and to cut a long story short they are not going to fix this issue.  It gets better – this problem only occurs in Internet Explorer.  Doing the same tests in Chrome will render different and more accurate results.  Also, SharePoint 2007 works as expected.

Just tell your content editors to work slower or have your IT staff roll out Chrome – thanks for another great feature!

SharePoint is like a bumble bee – technically it shouldn’t be able to fly but some how it does…


Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

  • Pingback: Tweets that mention Paul Liebrand's Weblog » SharePoint 2010 Markup Style Bug -- Topsy.com

  • http://profiles.google.com/coderbond Jeremy Bond

    Wow, not the solution I was searching for…. But this is great. I called MS about an issue with the Font Color disabling on hyperlinks. Bug, no plans to fix it.

    I’m trying to track down another problem. If you have a page that contains a lot of text, lets say several pages. Scrolll near the bottom of the page, does the Markup Style menu behave erratically, in my case it causes the menu to disappear and the page to shift up or down.