codeflood logo

Firefox Content Editor Scrollbar Issue

It was a real shame when Sitecore removed Firefox support when they released Sitecore 5.3. In prior versions of Sitecore you still had the option to log into the desktop from the login screen when using Firefox. And even though it didn't look quite as perfect as it did in IE, it was so much faster thanks to the faster javascript engine in Firefox.

But there are ways around that. Check my previous blog post on how to login to the desktop using Firefox in Sitecore 6.x .

Even though desktop support was removed you could still log into the page and content editors and edit content that way. A little while ago I had a client reporting that the scrollbars were missing in the content editor tree when they were using Firefox. This seemed quite odd, but sure enough, when I checked a Sitecore 6.0.2 site using the latest Firefox (version 3.5.5) after expanding out the content tree and clicking on an item the scrollbars disappeared. Thinking this may have been fixed in a later update I checked a 6.2 site, and the same error could be seen.

ff missing scrollbars

After much investigation and firebugging I finally found the issue. It lies in the /sitecore/shell/Controls/Gecko.js file. On line 495 is the following line:

element.setStyle({ height: "100%" });

This is the culprit. To solve the issue simply comment that line out.

ff scrollbar back

What I believe to be happening; the content tree sits inside a table cell. When you set a style with 100% height that means the element should be 100% of the height of it's containing element. In this case, a table row. This row also holds the fields section to the right of the content tree, which is much longer than the content tree and will push the height of the table row out. So when we set 100% height on the content tree panel, it should now be the same height as the fields section. At least that's what I think is happening.

I must point out that I haven't tested the above solution exhaustivly and this update may affect other areas of the system. I've also only checked the solution with the Firefox version mentioned above (3.5.5) and I suspect that this would break earlier versions on Firefox. If that were the case it wouldn't be too difficult to update the script so instead of commenting out line 495 just detect the browser version and use that in an "if" statement.

I've already logged the issue with Sitecore support so this post is just for the interim if you really need a fix and can't wait for another release from Sitecore. I'm also posting this to explain how I can do some of the things I do in my next post.

Comments

Sitecore will claim 100% support for Firefox and probably also Google Chrome in _all_ interfaces very soon. We are to test (or are already testing) in Windows and on Mac.

Alistair Deneys

I'd heard...and I can't wait for it :)

Bryan

Awesome. You're a lifesaver! Content Editor is *so* much faster in Firefox.
Wondering if PageEditor is working better in 6.2...

Mark

This code fixed my FireFox issue in SiteCore 6.1.0 Maybe SiteCore will get their act together soon and fix Chrome. Using IE with SiteCore is so painful.

Alistair Deneys

I know what you mean Mark :) As you can see from Lars' comment on this post, Sitecore will soon be proper cross browser comatible. I'm pretty sure that's for the 6.3 release.

Leave a comment

All fields are required.