Working in a view for a Document Library I enabled "inline-editing" and discovered that as any input-element receives focus the documents-ribbon-menu auto expands. This behavior is undesirable so my goal is to prevent the menu from auto expanding.
Through debugging I discovered suppressing window.SelectRibbonTab
prevents this.
To resolve I created "test.aspx" so that when it is the current page the execution of window.SelectRibbonTab
is suppressed, but all other page instances will remain unaffected.
I attempted to pattern my override from these stack answers
here & here but I'm unfamiliar with this concept and I am receiving a "Cannot assign to a function result" message.
Have a look at code below
window.SelectRibbonTab = function (obj) {
if (location.pathname.search('test.aspx')=0) {
return SelectRibbonTab.call(window, obj);
};
}(window.SelectRibbonTab);