Bug Misplaced choice window after dialogue on repeat event

I have an event trigger at the exit of my map that brings up a choice window set to appear in Middle. Choosing to leave will bring up a dialogue box with another choice window asking for confirmation. When triggering the exit event again after it, it'll continue to display the first choice window way further down.

First choice window:
Untitled.png


Dialogue box confirming to leave:
Untitled2.png


Triggering the same event again, afterwards:
Untitled3.png
Please show your event command to make it easy for us to emulate.
I believe this is because by default the choice window always displays relative to the message window (cf windowY method of Window_ChoiceList). This does not account for whether the message window is currently open/visible.

By default the message window is located at the top of the screen. Reloading the map scene (e.g. open/close the menu) between event activations will reset the message window to this position.

To reproduce:
Spoiler: Click to view sample event commands
◆Comment:References current message window position. : :Message window position resets whenever the scene changes. ◆Show Choices:1, 2, 3 (Window, Middle, #1, #2) :When 1 ◆ :When 2 ◆ :When 3 ◆ :End ◆Text:None, None, Window, Top : :Top text ◆Show Choices:T1, T2, T3 (Window, Middle, #1, #2) :When T1 ◆ :When T2 ◆ :When T3 ◆ :End ◆Text:None, None, Window, Middle : :Middle text ◆Show Choices:M1, M2, M3 (Window, Middle, #1, #2) :When M1 ◆ :When M2 ◆ :When M3 ◆ :End
Activating the event twice in a row results in the choices showing with vertical alignment:
  • Top, top, middle;
  • Middle, top, middle.
Suggested fix: when the message window is not open & active, display the choice window vertically aligned to the middle of the screen?
Please show your event command to make it easy for us to emulate.

Event.png
Confirmed. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/misplaced-choice-window-after-dialogue-on-repeat-event.138408/