Windows Server Posted January 23 Posted January 23 We discovered that invoking Office.ribbon.requestUpdate to set visibility to a contextual tab unnecessarily clears the Undo stack.Please lift this limitation if possible. Our customers complained about this issue, which does not exist on the legacy COM-based product.Consider the following ScriptLab snippet: Undo stack clearing upon `Office.ribbon.requestUpdate`Steps to reproduce:Part 1:Create a workbook with two worksheets, Sheet1 and Sheet2On Sheet1, enter "foo" in A1 and enter "bar" in A2.Activate Sheet2Press UndoValidate that Excel switched back to Sheet1 and the "bar" value disappearedPart 2:Register the ScriptLab snippet above ("Run in this tab") and press the "Register ribbon and worksheet change listener" button in the side panel to invoke requestCreateControls and register the worksheet change listener.On Sheet1, enter "foo" in A1 and enter "bar" in A2.Activate Sheet2Limitation: Undo is not available anymoreIn this scenario, we performed a harmless operation that simply made a ribbon tab visible. The customers do not expect the Undo stack to be cleared in this scenario.Note: the Undo stack gets cleared regardless if there is any effective change to the ribbon item visibility/enabled state. Simply calling the API seems to clear the stack.View the full article Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.