Another quick blog post for a fairly minor bug but causes a big annoyance for the content editors.
I tend to use Rendering Parameters a fair amount, it’s a really neat way of making controls more flexible and customisable without duplicating work, making it much easier for editors. But in all versions of Sitecore 8 I have worked with (update 2 to 5) whenever you click “Edit Component Properties” the Control Properties modal opens up correctly but you also jump to the top of the page:
When you have a long page that breaks the editing flow, making the users have to scroll to find their position again. If they were making a design change like a CSS class/styling option then you have to scroll back down, if it’s the wrong one then click again, change, scroll back down…
So, annoying and a time waster.
I finally got annoyed by it enough, and a fact we are at update-5 and the bug still exists, that I went ahead and figured out the fix.
The Simple Fix
In a text editor open up: /sitecore/shell/Applications/Page Modes/ChromeControls.js
On line 214, within
renderCommandTag function add:
This stops event propagation and the default action triggering. http://api.prototypejs.org/dom/Event/stop/
The outline of the function should look similar to this now:
That should make your editors happier 🙂
I blogged about a cleaner approach to making this change in the following blog posts, without editing the Sitecore js files directly or hurting kittens 🙂