Button click works only when i click twice (window on window)


I have the following issue: i have a table and when i select an item and click on button a window comes up (let’s say “A” window) where i can modify the item’s properties (fields). One of the field is a combobox with valueChangeListener.
When i change the combobox’s value a second window comes up (let’s say “B” window) and notify me, the “A” window’s fields will be reseted. There’s two buttons on the “B” window (Ok and Cancel). When i click on the Ok, the fields will be reseted and the “B” window will be closed (that’s fine), but when i click on the Cancel, the previously selected value will be switch back in the combobox and the fields keep its values (that’s all good) but the window doesn’t close, just when i repeat the Cancel button click (so 2 clicks needed on the Cancel). Both “A” and “B” window are modal.

Can anyone helps me why i need to click twice, and the 2nd click why close the “B” window and the 1st click doesn’t… Is there the problem because i have two window (“A” and “B” each on other) or why? Maybe it’s a focus lost, or a parent window misery? I have no ideas.

Many thanks in advance!
Károly Kótay-Szabó

I solved it, what an amateur i am… :wink:
When i click on then Cancel button on the warning window, the warning window closes and the combobox’ value switch back to the previous selected value (that was fine).
But the combobox still has the same valueChangeListener (which previously show the warning window), which pops up the warning window again (and very quickly, i didn’t realise the close and open effect). Then i clicked again on the Cancel, no value has changed (no valueChangeListener activated) and the 2nd warning window has closed (finally)…
I’m … sorry for wasting your time :unsure: