You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my understanding of the docs, modal "B" should always be on top of modal "A" after pressing the "Show modals"-button. Both Modals are newly created in the same frame, but modal "B" is shown last in the update-method. The first time I click "Show modals", it is correct, but after closing both modals and clicking "Show modals" again, "A" is on top of "B". The next time it's switched again, etc.
Desktop
OS: debian testing, XFCE
The text was updated successfully, but these errors were encountered:
Huh, when implementing modals I didn't think of opening multiple modals at once. The modal order just users the underlying layer order, and I don't think it's defined what happens when multiple layers are newly shown on the same frame.
We should at least update the documentation to clarify that opening multiple modals / layers at once will have a undefined order.
I see, then don't worry about it! I don't need it for an application, I was just developing/experimenting with a "modal manager" which makes it convenient to spawn modals and attach callbacks to them. When trying to spawn multiple modals on top of each other using my "modal manager" I noticed this behavior. Initially I didn't know if it's my codes fault (which it turned out it wasn't), so yes, a little note about this in the docs would be appreciated.
Describe the bug
When showing two or more new
Modal
s in one frame, the last one is not always on top (the order seems to alternate).Expected behavior
The last
Modal
which is shown via call to it'sshow
-method should always be on top as stated in the docs:To Reproduce
Create an empty project, add eframe as dependency and copy the following source code into main.rs:
From my understanding of the docs, modal "B" should always be on top of modal "A" after pressing the "Show modals"-button. Both
Modal
s are newly created in the same frame, but modal "B" is shown last in theupdate
-method. The first time I click "Show modals", it is correct, but after closing both modals and clicking "Show modals" again, "A" is on top of "B". The next time it's switched again, etc.Desktop
The text was updated successfully, but these errors were encountered: