-
Couldn't load subscription status.
- Fork 27
Open
Description
The ConfirmDialog should follow the "standard" yes/no/cancel dialogs behavior: when one presses Esc or clicks on the close icon in the dialog, the dialog's method isCancelled() needs to return true. Currently, it always return false (so the client code thinks "No" was pressed) due to setting the null-able isConfirmed variable without looking at whether we are showing the yes/no/cancel variant of the dialog. The listener which needs to be fixed in DefaultConfirmDialogFactory.java:
// Close listener implementation
confirm.addCloseListener(new Window.CloseListener() {
private static final long serialVersionUID = 1971800928047045825L;
public void windowClose(CloseEvent ce) {
// Only process if still enabled
if (confirm.isEnabled()) {
confirm.setEnabled(false); // avoid double processing
confirm.setConfirmed(false);
if (confirm.getListener() != null) {
confirm.getListener().onClose(confirm);
}
}
}
});
The fix (adding one "if") seems to be very easy to do...
Metadata
Metadata
Assignees
Labels
No labels