Open chaojian-zhang opened 7 months ago
I'm having the same issue. Left clicking away from the PopupMenu in GraphEdit hides the menu but it keeps focus. Oddly enough when it's in this broken state you can right click anywhere in the editor (outside of the GraphEdit, even the Godot main menu) and it will spawn the popup there.
I'm having the same issue. Left clicking away from the PopupMenu in GraphEdit hides the menu but it keeps focus. Oddly enough when it's in this broken state you can right click anywhere in the editor (outside of the GraphEdit, even the Godot main menu) and it will spawn the popup there.
And calling release_focus()
doesn't seem to help.
Can reproduce in master Godot v4.3.dev (4e990cd7e).
It seems to be some embedded subwindow input propagation issue.
This happens with AcceptDialog
s and Popup
s as well as PopupMenu
s.
The right or middle mouse button must pressed down when calling popup()
/popup_centered()
, it won't happen for key presses, left mouse button, or mouse up events.
It works as it should when using accept_event()
or turning off display/window/subwindows/embed_subwindows
.
Yeah, I am having the exact same issue
Tested versions
v4.2.1.stable.official [b09f793f5] (The issue DO NOT exit on v3.5.2)
System information
Windows 11 Pro - Godot_v4.2.1-stable_win64.exe
Issue description
In Godot v4.2: when summoning a popup and subsequently close it (either by clicking outside, or calling
hide()
), it will cause all other popups and certain GUI hover event stop working (e.g. it causes it not possible to resize aGraphNode
if using aGraphEdit
). This issue notably blocks input not just on MenuBar, but also on MenuButton (I suppose it's because they all uses popup window behind the scene). However, if one attempts to summon the popup at the same time performing a typical mouse button click on any menu bar item, the problem goes away; The problem can also be "fixed" if one switches the window (e.g. on Windows, useAlt-Tab
), i.e. defocusing then focusing again the Godot application window.Please see video below for a demo:
https://github.com/godotengine/godot/assets/7077098/b5bac962-a81e-4b08-ad41-928d917ed39f
I CAN CONFIRM THE ISSUE DOES NOT EXIST ON GODOT Godot_v3.5.3-stable_mono_win64, which doesn't have a MenuBar so I tested with MenuButton. Setups for both Godot 4.2 and Godot 3.5 including both MenuBar, MenuButton and PopupMenu are available at the end of this description.
Steps to reproduce
Setup:
Reproduce issue:
hide()
in script, e.g. through a key-binding; This is not shown in the video above or setup projects below)Workaround:
Minimal reproduction project (MRP)
The project that shows the issue for Godot 4.2: https://github.com/Charles-Zhang-Bug-Reports/Godot_4_2_Popup_Issue
(Notably: https://github.com/Charles-Zhang-Bug-Reports/Godot_4_2_Popup_Issue/commit/b6f3360eaa06f7b0373b9bdda8e3c1fcc960be11)
The project that shows the same issue does not exist for Godot 3.5: https://github.com/Charles-Zhang-Bug-Reports/Godot_3_5_3_No_Popup_Issue (Notably: https://github.com/Charles-Zhang-Bug-Reports/Godot_3_5_3_No_Popup_Issue/commit/570fb2f2deb3976744edac32fee8d2ef03f64f33)