Clear Filters
Clear Filters

How can I clear stuck help popups?

34 views (last 30 days)
Chuck37 on 1 Apr 2020
Commented: Adee on 22 Nov 2021
2019a Matlab on Linux. Sometimes a help popup for a function (or similar) will pop up from the GUI and refuse to go away when it normally would. They continue to sit there and block what is behind them. It stays at a constant place on the screen, so I can sometimes move the window around to get my work done. Is there any way to clear them short of killing matlab and starting over? This is not on a figure, it's in the command window or editor.

Accepted Answer

Yair Altman
Yair Altman on 2 Apr 2020
Edited: Yair Altman on 12 Jun 2020
Updates June 12, 2020:
  1. There is a recognized bug report on a very similar issue: - this bug report is about function hints, but presumably it's the same underlying problem as for help popups.
  2. The following code snippet is supposed to close any open help popups or function hints:
ws =;
while ws.hasMoreElements, w=ws.nextElement; if any(strcmp(w.getName,{'HelpPopup','FunctionHints'})),w.dispose,end, end
The "stuck popup" problem has annoyed me for years. I notice them, for example, if I display a large multi-line data-tip (or the code that's displayed when you hover the mouse above the "..." in folded code) in the editor and then switch to another editor file very quickly. The popup then gets stuck. As noted above, these popups are not a figure and no programmatic close of figures closes them.
My experience has been that the following combination of actions can sometimes (not always, nor predictably) assist:
  1. click the Esc key
  2. hover the mouse on top of another "..." of folded code
  3. switch to another editor file
  4. switch to another application that will hide (overlap) Matlab, and then switch back to Matlab
In the case of a function help, try clicking F1 to try to replace the persistent popup with a new one (that will hopefully be more well-behaved), then dismiss it in the normal way.
Unfortunately, I am not aware of a programmatic way to dismiss tooltip popups in the Editor.
Philip Gillibrand
Philip Gillibrand on 23 Jul 2021
yes, that code snippet works!! finally able to rmove those popups without restarting matlab. thanks very much.
Adee on 22 Nov 2021
Yair, you rock, touch down, slam dunk again. I could guess you would provide the solution to this long frustrating problem - just had to get mad enough to look for it... Tons of thanks.

Sign in to comment.

More Answers (2)

Adam Danz
Adam Danz on 1 Apr 2020
Edited: Adam Danz on 2 Apr 2020
Note: This answer does not address the problem of stuck function hints and other pop-up messages internal to Matlab. It addresses figures that won't close which I misunderstood to be to problem explained by OP.
Quick fix for current figure:
Make sure the stubborn figure is current (rather than your GUI) and then execute,
close(get(groot,'CurrentFigure'), 'force')
This will not work on UIFigures since their handles are not visible.
Quick fix for all stubborn figures (UIFigures, too)
To close all figures with CloseRequestFcn functions that aren't set to the default closereq,
% Get list of all open figures
allFigs = findall(0, 'Type', 'Figure');
% Identify which figures have the default close req fcn
isDefault = cellfun(@(h)strcmpi(h, 'closereq'), get(allFigs, 'CloseRequestFcn'));
% Close all figures with non-default close req fcn
Better option:
Find where the stubborn figure is created and set its CloseRequestFcn
% fig is the figure handle
fig.CloseRequestFcn = 'closereq';
Adam Danz
Adam Danz on 2 Apr 2020
Edited: Adam Danz on 2 Apr 2020
Ah, you mean function hints.
I don't know if this will fix the problem but try turning them off.
Go to Preferences > keyboard, then uncheck "Enable function hints".
Image Analyst
Image Analyst on 2 Apr 2020
I'm not sure who gets rid of it. The screen needs to be repainted, so who sends the message to repaint and who does the repainting? If another app is below/behind it, does that app get a signal to repaint itself? Or does the OS repaint it? I doubt MATLAB remembers what was behind it and repaints it because the app may look different from the time MATLAB started to when it closed. And I don't see how the OS would know what should be painted. What I think happens (and maybe I'll poke Yair to see if he knows for sure) is that the OS knows MATLAB shutdown, and the OS sends a message to the underlying app (or the OS itself if there is no other app underneath MATLAB) and that underlying app is responsible for repainting itself. So either way the "stuck popup" in the screen memory gets painted over when the underlying app or the OS repaints its client area.

Sign in to comment.

Unal Ege Gaznepoglu
Unal Ege Gaznepoglu on 2 Jun 2020
Edited: Unal Ege Gaznepoglu on 2 Jun 2020
I am also experiencing this problem and I must say it is extremely annoying. I have appended two screenshots. Sadly, I couldn't get the initial popup, as it disappeared but fixed the command window output instead. Unfortunately the suggestions by @Yair did not help. If this happens, the only way to get rid of it is to restart MATLAB.
(Edit: The java exceptions in the command window are unrelated with the popup problem.)
One thing I have noticed is if I undock the editor and command window, the popup is stuck on the main gui and not on them.





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!