Enabling the Mouse Wheel in the Sitecore 8+ Ribbon.

Anton-sitecore-blog

Do you know that there was nice feature in Sitecore 6 - 7.2 that allows use mouse scroll on Content Editor Ribbon?

Once when I was working on project based on Sitecore 7.2 I accidentally scrolled the mouse wheel when cursor was on Content Editor ribbon.

What happened next with this Sitecore behaviour surprised me: it switched to the next Content Editor tab. I found this be a very use feature that sped up my work in Content Editor, especially when you are looking for a button and you may have forgotten where it is located. It not only saved me time but also stopped this getting on my nerves as I utilise this feature day to day.

But, when I switched to project based on Sitecore 8, I was disappointed. The scroll did not work anymore... So, I then decided to return to this feature and add into Sitecore myself to improve it!

All that you need to do this is:, find \sitecore\shell\Applications\Content Manager\Content Editor.js file and put this JavaScript to the end:

jQuery(document).ready(function () { 
jQuery("#RibbonPanel").bind("mousewheel", function (event) {
var array = jQuery(event.currentTarget).find(".scRibbonNavigatorButtonsGroupButtons a");
if (array.length > 1) {
var active = jQuery(event.currentTarget).find(".scRibbonNavigatorButtonsGroupButtons a.scRibbonNavigatorButtonsActive");
var index = array.index(active);
var delta = (event.originalEvent.wheelDelta > 0 ? 1 : -1);
if (index === array.length - delta) {
if (delta < 0) {
array[0].click();
}
else {
array[1].click();
}
}
else {
if (index === 0) {

 

Voila, you can use scroll for ribbon navigation again!

want to speak to one of our experts?

Anton Tishchenko Thumbnail
Anton Tishchenko
Head of Digital Engineering
Anton has worked as a developer since 2007, he is a highly experienced Sitecore developer who previously worked as a Technical Team Lead at Sitecore. Anton's expertise in the Sitecore platform is formidable; he's definitely one of the world's finest Sitecore ninjas and in 2019 he was recognised as the only Sitecore MVP in the Ukraine when he achieved his Technology MVP Status.
Anton Tishchenko Thumbnail

Anton Tishchenko

07 Aug 2017 - 5 minute read
share this

stay in the know, stay ahead.

Get the latest from the agency, including news, events and expert content.
explore services in the article
find out what we can do for you
read some of our case studies