Opened 12 years ago

Closed 12 years ago

#3754 closed defect (fixed)

Inconsistent Esc key handling across form widgets

Reported by: ptbrunet Owned by: ptbrunet
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by tk)

[edited to be more consistent with followup comments by reporter by Karl (tk)]

Esc key handling is inconsistent across the following widgets: This is the current behavior for the Esc key on all the widgets in .../dijit/tests/form/test_InlineEditBox.html

text box textarea date text box filtering select programmed text box spinner

More details can be found in the follow up comments by the reporter.

Change History (10)

comment:1 Changed 12 years ago by bill

Owner: changed from bill to Douglas Hays

comment:2 Changed 12 years ago by Douglas Hays

Owner: changed from Douglas Hays to haysmark

comment:3 Changed 12 years ago by haysmark

Owner: changed from haysmark to ptbrunet

comment:4 Changed 12 years ago by ptbrunet

This is the current behavior for the Esc key on all the widgets in .../dijit/tests/form/test_InlineEditBox.html

First widget, text box:

  • Esc (with no prior edits) closes the box.
  • Esc after edits doesn't cause a revert (bug), next Esc closes the box.

Second widget, textarea

  • Esc (with no prior edits) does nothing (bug).
  • Esc after edits causes revert, second Esc does nothing (bug).

Third widget, date text box: like the second widget (bug).

Fourth widget, filtering select

  • Esc (with no prior edits) closes the box.
  • Esc after edits causes revert and closing of the box (bug). (But don't use the pop-up list box. See #3785.) It should take 2 Escs to close the box.

Fifth widget, programmed text box: like the first widget (bug).

Sixth widget, spinner: (no bugs)

  • Esc (with no prior edits) closes the box.
  • Esc after edits does a revert, next Esc closes the box.

The correct behavior is:

  • Esc (with no prior edits) should close the box.
  • Esc (with prior edits) should cause the value to revert and a second Esc should close the box.

Note: It could be argued that for consistency Esc should have to be pressed twice even when there are no prior edits.

The date hierarchy look like this: DateTextBox, RangeBoundTextbox, MappedTextbox, ValidationTextbox, Textbox, _FormWidget, etc.

The fix Doug did to implement the revert feature is in change set 9627, bundled in with the fix for 3610, in _onKeyPress handler in _FormWidget.

comment:5 Changed 12 years ago by ptbrunet

A second autoSave version of the text area was recently added to the test case so the third widget mentioned above in comment 4 is really the fourth - and so on.

comment:6 Changed 12 years ago by tk

Description: modified (diff)
Summary: DatePicker: When it's open, Esc doesn't close the edit box or the popupInconsistent Esc key handling across form widgets

comment:7 Changed 12 years ago by Douglas Hays

(In [9881]) References #3754. Added autocomplete="off" to textbox template.

comment:8 Changed 12 years ago by bill

(In [9994]) Fixes the problem of pressing Esc not closing the date box (in the inline test) when there have been no changes to the value. Refs #3754. Patch from Pete Brunet (IBM, CCLA on file)

comment:9 Changed 12 years ago by ptbrunet

I think this can be closed. I opened #4050 for an additional bug that's not already fixed related to this.

4050 Inline autoSave filtering select - pressing Esc immediately closes box, should just revert

comment:10 Changed 12 years ago by ptbrunet

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.