Excel-DNA / Excel-DNA/IntelliSense
Arguments tooltip is lost when certain topmost window steals focus
- 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:

**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:

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.