Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/26/21 20:49:51 (2 years ago)
Author:
gkronber
Message:

#3047: set SuppressKeyPress=true in all controls that handle the Enter key explicitly (except for dialogs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Clients.OKB.Views/3.3/Query/Views/OrdinalComparisonLongFilterView.cs

    r17180 r18166  
    5151
    5252    private void valueTextBox_KeyDown(object sender, KeyEventArgs e) {
    53       if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     53      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
    5454        label.Focus();  // set focus on label to validate data
    55       if (e.KeyCode == Keys.Escape) {
     55        e.SuppressKeyPress = true;
     56      } else if (e.KeyCode == Keys.Escape) {
    5657        valueTextBox.Text = Content.Value.ToString();
    5758        label.Focus();  // set focus on label to validate data
     59        e.SuppressKeyPress = true;
    5860      }
    5961    }
Note: See TracChangeset for help on using the changeset viewer.