Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop-up is not dissmissed when clicking in a modal "curtain". #7654

Closed
rodrigorc opened this issue Jun 3, 2024 · 2 comments
Closed

Pop-up is not dissmissed when clicking in a modal "curtain". #7654

rodrigorc opened this issue Jun 3, 2024 · 2 comments

Comments

@rodrigorc
Copy link
Contributor

Version/Branch of Dear ImGui:

1.90.7

Back-ends:

all

Compiler, OS:

any

Full config/build information:

No response

Details:

  1. Open a modal pop-up, and then over it open a normal pop-up, such as the "Combo" or "Color picker" in the "Stacked modals" demo.
  2. When clicking outside of the normal pop-up it should be dismissed, but this only works if I click inside the modal window. If instead I click in the modal dimmed area nothing happens.

I can imagine a situation where a big transient pop-up could block the UI and the user would be unable to dismiss it.

Screenshots/Video:

image

Minimal, Complete and Verifiable Example code:

No response

@ocornut
Copy link
Owner

ocornut commented Jun 5, 2024

Should be fixed by 0561d70.

  • I was first puzzled that the "window_popup_menu" test was breaking but I realized the breakage was specifically under a #if !IMGUI_BROKEN_TESTS block aka was testing an undesirable behavior, which we now fixed.
  • Then "window_popup_nested_interruptions" was breaking but it only highlighted that my first fix attempt was broken, at it accidentally allowed to close a nested modal by focusing the previous one. The correct fix is to call ClosePopupsOverWindow(GetTopMostPopupModal(), ...) and not ClosePopupsOverWindow(blocking_modal);.

Those specifics tests are a bit laborious to work but they are always helpful.

@ocornut ocornut closed this as completed Jun 5, 2024
ocornut added a commit to ocornut/imgui_test_engine that referenced this issue Jun 5, 2024
ocornut added a commit to ocornut/imgui_test_engine that referenced this issue Jun 5, 2024
@ocornut
Copy link
Owner

ocornut commented Jun 5, 2024

Also added a simpler "window_popup_close_with_void" test:
ocornut/imgui_test_engine@f75f8ed

ocornut added a commit to ocornut/imgui_test_engine that referenced this issue Jun 5, 2024
ocornut added a commit to ocornut/imgui_test_engine that referenced this issue Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants