# \[Bug\] Random tooltips when hovering over code

**URL:** <https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [February 7, 2024, 8:43am UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350 "2024-02-07T08:43:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvaro\_Rodriguez](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Alvaro\_Rodriguez](https://forum.inductiveautomation.com/u/Alvaro_Rodriguez)\
**Post date:** [February 7, 2024, 8:43am UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350/1 "2024-02-07T08:43:41Z")

</div>

There are this random popup/tootlips that appear when hovering above some word in code. They more often than not have nothing to do with the actual code that is written, and seem to only check the first letters (up to the mouse cursor?) of the word you are hovering over.

![weird_tooltip_1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/1/61cba18035ff6870cf766b219fe3b1832843f522.jpeg)  
 ![weird_tooltip_2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/5/05cc707c86bb34e6f7cdc43cc1a19629ed698b4b.jpeg)  
 ![weird_tooltip_3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e5898c6c4bb73c4408e783cee6ba5133d4e67531.jpeg)  
(The red arrows mark where my mouse cursor is, as is doesn't show in the screenshot)

I would expect there to be either useful popups/tooltips which actually relate to the code, or no popup at all.

Seen on Ignition 8.1.18 and Ingition Edge 8.1.32

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 7, 2024, 2:58pm UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350/2 "2024-02-07T14:58:28Z")

</div>

and does the script work or is there an issue with somewhere else?

---

<div class="post-metadata">

**Author:** ![Alvaro\_Rodriguez](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Alvaro\_Rodriguez](https://forum.inductiveautomation.com/u/Alvaro_Rodriguez)\
**Post date:** [February 7, 2024, 3:04pm UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350/3 "2024-02-07T15:04:33Z")

</div>

It works fine, I suppose It's just a visual thing. It's a bit annoying, though

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [February 9, 2024, 1:36am UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350/4 "2024-02-09T01:36:08Z")

</div>

Here is another similar post that I read recently where a work around was offered:  
[https://forum.inductiveautomation.com/t/disable-tooltips-in-designer](https://forum.inductiveautomation.com/t/disable-tooltips-in-designer/85098/14)

When the designer tooltips get annoying, they can be turned off using the script console, or the delay can be increased to retain the functionality while reducing the frequency of unwanted popups:

```auto
from javax.swing import ToolTipManager

# arbitrarilyHighNumber = 10000
# ToolTipManager.sharedInstance().initialDelay = arbitrarilyHighNumber  

# ...or disable the tooltips completely
ToolTipManager.sharedInstance().enabled = False

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 12, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/bug-random-tooltips-when-hovering-over-code/85350/5 "2024-02-12T16:26:33Z")

</div>

> [@Alvaro\_Rodriguez](#):
>
> only check the first letters (up to the mouse cursor?)

It's working backwards from the mouse position to the first whitespace character. As you've observed, it's not particularly good 🙂 But it's all we can do at the moment, because we don't have any true AST parsing of live code in the designer, so we don't have a true "token" to look for - only simple direct string matching. This works pretty okay, actually, for built-in extension function parameters and the `system` library - but does fall apart for "builtin" items like `bool` and `False`. It's on my list to fix this tooltip system "properly" (in some 8.3.x version, hopefully), but I might also push a smaller fix to exclude simple builtins or low-confidence matches in the meantime.
