How can I clear stuck help popups?

56 ビュー (過去 30 日間)
Chuck37 2020 年 4 月 1 日
コメント済み: Adee 2021 年 11 月 22 日
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.


Yair Altman
Yair Altman 2020 年 4 月 2 日
編集済み: Yair Altman 2020 年 6 月 12 日
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.
  3 件のコメント
Adee 2021 年 11 月 22 日
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.


その他の回答 (2 件)

Adam Danz
Adam Danz 2020 年 4 月 1 日
編集済み: Adam Danz 2020 年 4 月 2 日
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';
  7 件のコメント
Image Analyst
Image Analyst 2020 年 4 月 2 日
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.


Unal Ege Gaznepoglu
Unal Ege Gaznepoglu 2020 年 6 月 2 日
編集済み: Unal Ege Gaznepoglu 2020 年 6 月 2 日
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!

Translated by