Excel-DNA / Excel-DNA/IntelliSense

Arguments tooltip is lost when certain topmost window steals focus

Open
#124 17 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
179
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Hi @govert,

Our team has been struggling with an unpleasant issue when at times the arguments tooltip doesn't pop up when needed. We tracked it down and created a minimal repro:

![EXCEL_7gK5ojzvFk](https://user-images.githubusercontent.com/36232686/206003899-8baae380-5eb0-44dc-b694-2c9c39122244.gif)

**Steps to reproduce:**

1. Follow the "Getting started" guide in https://excel-dna.net/
2. Add an ExcelArgument attribute to `name` parameter of `SayHello` method, e.g.: ```[ExcelArgument(Name = "Name", Description = "Enter your name")]```
3. Build and run the addin
4. Load ExcelDna.IntelliSense[64].xll
5. Focus on a cell and press Windows key and plus sign - Magnifier appears
6. Close Magnifier (optional)
7. Type `=SayHello(`

Expected: Arguments tooltip must show up.
Actual: It does not show up, closing the Magnifier doesn't help.

**More investigation by our team:**
We turned on diagnostic logging and saw that the problem roots in FormulaEditWatcher.cs. It appears that it normally expects events in the following order: `Focus` > `Show` > `Unfocus` > `Hide`. In our case however, we saw events in the produced log in `Focus` > `Unfocus` > `Hide` order.

We attempted to add some compensating code to IntelliSense and it helped:
![image](https://user-images.githubusercontent.com/36232686/206005489-eb013355-d084-4934-96b2-275726f87e1a.png)

If that works, I could submit a pull request. Otherwise, we would love to hear your advice on this matter.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.