function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David ChurchillDavid Churchill 

Sidebar Won't Collapse on Custom Visualforce Page

I've noticed that when displaying the sidebar on a custom visuaforce page using <apex:page ... sidebar="true"> or omitting the sidebar parameter, that I can't collapse the sidebar.  I see the handles to collapse it but they don't do anything when clicked.  The collapse sidbebar setting is enabled in the User Interface customization in Setup and it collapses fine on standard Salesforce pages.  Am I doing something wrong or is this a "feature"?

Thanks in advance,
David
KaranrajKaranraj
I'm not finding this issue in my vf page. Make sure that you are clicking correctly on the arrow mark. Can you try with the keyboard shortcut and check that. Click Alt + S on your keyboard and then check
David ChurchillDavid Churchill
Karanraj, 
Thanks for the info.  I am sure I'm clicking on the handle/button and tried the keyboard shortcut as well and still wasn't able to get it to work.  Like I mentioned, it works fine with standard SFDC pages.  So I guess now I'll try some other custom VF pages that don't have the components I'm using now like the tab panel.
KaranrajKaranraj
Do you have any java script or jquery in the visualforce page? Which might blocking that? I'm not replicate that in any of my custom visualforce page
thomas.ax1271thomas.ax1271
I struggled with this today and found that the problem was a single line of JS on my VF page. I was using setFocus() in window.onLoad() to prevent input fields from automatically being focused when the page loaded. For whatever reason this breaks a bunch of Salesforce JS on the page but gives no indication of that.

To still get the functionality I needed I used this line code instead:
function setFocusOnLoad() {}