Open wh1t3cAt1k opened 1 year ago
Thank you for letting us know about this issue. We will take a look shortly. Thanks.
@wh1t3cAt1k, I am not able to reproduce the issue locally. For me, the Taskpane stays open in "Book1". Can you check if you can reproduce this issue on windows as well?
@madhavagrawal17 were you testing on Windows? It is specific to Mac only for me.
@wh1t3cAt1k, I tried it on both windows and Mac but cannot reproduce it locally. Are there any other details I am missing?
@Wenjun-Gong @madhavagrawal17 it is replicable using the same exact steps in the bug description.
Here is another repro just from now:
Mac OS Ventura 13.2.1, Excel Desktop for Mac 16.71
Did you scroll down in the task pane and clicked the "Run" button, and then very quickly clicked CMD+N to bring a new workbook into focus?
@wh1t3cAt1k, Thank you for the information. Finally, I am able to reproduce this issue locally and started investigating this issue.
Thank you. Please let us know when there's an update on the root cause or ETA/complexity!
I did see the issue on MAC. But when I used our latest code, I found this issue no longer occurred. The version in which this issue not happening is below:
@madhavagrawal17 @yihuax @Wenjun-Gong the issue is still happening in a variety of scenarios for us. We would appreciate if you investigate again.
I'm able to reproduce this in v 16.74 Excel for Mac. The following repo is a minimal repro of this issue.
https://github.com/jgamboavx/repro-add-in-tab-on-new-workbook
Clicking on 'Create workbook' in the taskpane will create a new workbook and immediately call Office.addin.showAsTaskpane()
The taskpane will move to the newly created workbook.
@madhavagrawal17 @yihuax @Wenjun-Gong just wanted to follow up on the issue, it is still a problem for us that necessitates hack-ish workarounds in the product.
Sure, We will try to reproduce this issue locally again.
Hello @jgamboavx ! I followed your repro steps above. I have two questions:
In your link, you said to run npm run dev-server
and then npm start
. But npm run dev-server
keeps running and never finishes. How to run npm start
?
You said "Open the add-in taskpane. Click on the 'Create Workbook' button. (or call the =CONTOSO.NEWWORKBOOK() function). A new workbook will open. On the original workbook, the taskpane will go gray." After I clicked Create Workbook. a new workbook did open (without the taskpane opened, but I can click the button to open it). No matter whether the taskpane is opened or not in the new workbook, the original taskpane is NOT grayed out. Comments?
I am using Excel 16.76. Thanks.
I'm able to reproduce this in v 16.74 Excel for Mac. The following repo is a minimal repro of this issue.
https://github.com/jgamboavx/repro-add-in-tab-on-new-workbook
Clicking on 'Create workbook' in the taskpane will create a new workbook and immediately call
Office.addin.showAsTaskpane()
The taskpane will move to the newly created workbook.
In your link, you said to run npm run dev-server and then npm start. But npm run dev-server keeps running and never finishes. How to run npm start?
@yihuax, I should have made it clearer that npm start
should be ran on a new terminal, while npm run dev-server
is kept running on another.
The is according to Microsoft's tutorial .
Regarding the issue, here's a demo to better illustrate it: https://streamable.com/xpowg0
Recorded on 16.74.
@yihuax Because you noted you're using Excel 16.76, I've also updated Excel to this version and can confirm the issue is still replicating on it.
@madhavagrawal17 @yihuax-zz could we please revisit this issue if possible? It is still bothering us and it's been a long radio silence here. The replication scenario in https://github.com/OfficeDev/office-js/issues/3220#issuecomment-1611080957 is still relevant.
Having multiple workbooks open is very common for our scenarios and it is highly confusing when the side panel connected to one workbook "migrates" to a completely unrelated one.
Related: https://github.com/OfficeDev/office-js/issues/2361
I can confirm that it used to crash Mac for us too. Though I cannot reliably catch the crash now, the fact that the add-in "jumps" to another workbook is already fishy and may lead to all sorts of issues, I suspect.
Your Environment
Expected behavior
Office.addin.showAsTaskpane()
should always open the add-in in the same Excel window where it was called.Current behavior
If another (new) Book2 is in focus at the time when
Office.addin.showAsTaskpane()
is invoked:Steps to reproduce
The steps are confirmed with manual wef insertion and dev server running. Please repeat exactly the same steps in case they matter.
Minimal repro: https://github.com/VelixoSolutions/reproduce-mac-jumping-taskpane
In a few seconds, observe task pane appeared in second workbook, and grey side panel in the first one, and the rest of the weird behaviour above.
Link to live example(s)
Live demonstration: https://www.loom.com/share/f16855696cd24127b169411c813687eb I suggest using 1.2x speed for best experience.
Provide additional details
Previously used to crash Excel (maybe still crashing under some circumstances, but not replicatable on minimal repro) - at any rate, it is already very wrong for the add-in to appear in a different window.
Context
The issue is impactful for us, because when our custom functions fail calculation because of user not being logged in to the server, we invoke
showAsTaskpane()
and navigate the user to connection login screen.On Mac, this jumping behaviour leads to user confusion, previously it led to total Excel crash.