Hello,
I am experiencing an issue with the built-in Ignition function:
system.gui.confirm(confirmationText, "Confirm Action").
When the confirmation popup appears, mouse interactions work correctly:
However, the issue occurs when using the keyboard .
Steps to reproduce:
Change a value (for example, from 10 to 11 ).
The confirmation popup appears (see Fig. 1 , Fig. 2 , Fig. 3).
Press Tab → focus moves to Yes .
Press Tab again → focus moves to No .
Press Enter while No is focused.
Actual Behavior:
Even when No is focused, pressing Enter still performs the Yes action, and the value changes to 11 .
Expected Behavior:
Pressing Enter should trigger the button that currently has focus.
If No is focused, the No action should run.
This makes keyboard navigation behave incorrectly and may cause unintended changes.
Please let me know if this is a known issue or if there is a recommended workaround.
Thank you.
Fig1: The value is 10
Fig2: The confirmation Popup appears(Changing Value from 10 to 11)
Fig3: Even when the focus is on No , when I press Enter , the value 11 is still updated.
Can you post the script you are using?
I am not using any custom script.
I am only using the built-in function:
system.gui.confirm(message, title, allowCancel)
.
dgratz
November 20, 2025, 1:26pm
4
I don’t know if there’s a way to change the behavior of the built-in confirmation dialog, but to achieve your desired result, you could create your own simple popup, and even parametrize it for the tag you’re changing.
If you script the yes and no buttons with a keyPressed action handler and use
if(event.keyCode == event.VK_ENTER): to filter for the enter key when the button is selected, that should do the trick.
That is default behavior for a confirmation box
Enter = Default button action (in this case, Yes)
Esc = Cancel
Space = Button action
2 Likes
How are you doing the binding on the control?
Is the value of the text box bound to the actual tag? Is it bidirectional?
I am assuming you are using the key press event and turning on confirmation there and then writing to the tag?
You cannot have a bidirectional binding on the control AND use the key press event to write to it.
Can you post some screenshots of the value binding and of the configured event?
Wrap your system.gui.confirm() call like this:
from javax.swing import UIManager
UIManager.put("Button.defaultButtonFollowsFocus", True)
x = system.gui.confirm('Really?', 'Title')
UIManager.put("Button.defaultButtonFollowsFocus", False)
This will make the default button follow the focus.
1 Like