SharePoint 2010 Markup Style Bug
We discovered a bug in SharePoint 2010 and the usage of the markup styles when you are editing a page.
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:
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 </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:
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 </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…




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