lojjic / PIE

A behavior for Internet Explorer allowing it to recognize and render various CSS3 box decoration properties
http://css3pie.com
Other
2.79k stars 235 forks source link

Sharepoint 2007: PIE creating an error after being called. #164

Open supall opened 13 years ago

supall commented 13 years ago

We have a Mega Drop Down menu that utilizes PIE. Now, PIE creates the styles we need perfectly, however, we have run into an issue where in Sharepoint 2007, a user will click on an "Edit Content" section of the page (which displays the WYSIWIG editor), and we get an error stating as follows:

"One or more URLs were not valid and have been reformatted. Review the links before leaving this page."

We called the PIE script only when the user hovers over the navigation bar at the top and executes until after displaying the menu. We only get the above error after hovering and executing the PIE script at least once. I looked at the PIE_uncompressed.js file and I've at least located a starting point on line 2288 (of latest release beta5):

s['behavior'] = 'url(#default#VML)';

Commenting out the above doesn't throw the error. How is this being formatted? Where can I find this VML url?

OllyHodgson commented 12 years ago

I had the same issue a while back and ended up using an EditModePanel on the master page to work around it:

<body>
<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display" SuppressTag="true">
<div class="live">
</PublishingWebControls:EditModePanel>

[the rest of the page goes here]

<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Display" SuppressTag="true">
</div>
</PublishingWebControls:EditModePanel>
</body>

That means a <div class="live"> wraps the page content when the page is in display mode. So then in my CSS, I did something like this:

.live #content h1 {
        -pie-background: url(/PublishingImages/template/bg-headlines-article-right.png) bottom right no-repeat, url(/PublishingImages/template/bg-headlines-article.png) bottom left no-repeat;
        behavior: url(/js/PIE.htc);
}

This means you lose the PIE enhancements when the page is in edit mode. For us that was an acceptable trade-off.