Ticket #230 (new defect)
DnD: A race condition arises on dialog when tabbing off a field
| Reported by: | rmatthews | Owned by: | rcmatthews |
|---|---|---|---|
| Priority: | Low | Milestone: | plugins-dnd-1.1-alpha-1 |
| Component: | Plugins: DnD Viewer | Version: | nof: 3.0M4 |
| Severity: | minor | Keywords: | |
| Cc: |
Description (last modified by rcmatthews) (diff)
If the availability of the OK button of a dialog depends on the state of the last field in the dialog, then tabbing off that field (when the new state of that field would normally cause the OK button to be enabled) can sometimes cause the focus to skip to the Cancel button.
This happens because the field update occurs in a BackgroundTask? (in a separate thread) while the validation of the button occurs in the AWTEvent thread. Sometimes the state of the field is not updated before the button is enabled/disabled causing the tab the skip the still disabled field.
Using the enter key is a safer bet as the field is updated on the first press, and the button invoked on the second.
see AbstractField?.initiateSave(...)
