Opened 15 years ago

Closed 14 years ago

#2559 closed enhancement (fixed)

InlineEditBox onUndo callback never called

Reported by: guest Owned by: bill
Priority: high Milestone: 1.0
Component: Dijit Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


As per the documentation and comments in the code, when the cancel button is clicked the onUndo() callback should be called but it is not ever. Looking at the code onUndo() is only called through undo(), and undo is never called. QED.

Attachments (1)

inlineEditCallback.diff (4.2 KB) - added by [email protected] 15 years ago.
patch, changes test, and fixes all callbacks…

Download all attachments as: .zip

Change History (12)

comment:1 Changed 15 years ago by guest

If you need more info about this bug report please contact jeffg at

comment:2 Changed 15 years ago by [email protected]

If you want to know if the cancel button is pushed, use cancelEdit()

Changed 15 years ago by [email protected]

Attachment: inlineEditCallback.diff added

patch, changes test, and fixes all callbacks...

comment:3 Changed 15 years ago by alex

Resolution: fixed
Status: newclosed

applied in [7547]. Thanks for the quick turnaround on the patch.

comment:4 Changed 15 years ago by [email protected]

Resolution: fixed
Status: closedreopened

A few key things: I think "name" should be passed to each callback, not just onSave... Now that onCancel actually exists and is called (where before it wasn't), this needs to be done to be consistent. OnChange? is now called even if no change by the user is made... I suggest this is unneccesary. My suggestion is to simplify this interface while keeping maximal flexibility by replacing the now 3 callback functions into just 1 callback as follows:

onCompletion( whichButtonPressed, newValue, oldValue, name ) { whichButtonPressed will be true for 'save' or false for 'cancel' user can compare old & new values to see if anything changed and 'name' is the context the user provides or null otherwise }

of course for backwards compatiblity you leave onSave() as is, though deprecate it

comment:5 Changed 15 years ago by alex


moving to 0.4.3 for further discussion. The patches applied to date made it into 0.4.2.

comment:6 Changed 15 years ago by bill

Owner: changed from bill to Douglas Hays
Status: reopenednew

comment:7 Changed 15 years ago by Adam Peller

Component: WidgetsDijit

comment:8 Changed 15 years ago by Douglas Hays

Milestone: 0.91.0
Priority: highnormal
Type: defectenhancement

There is no Undo function (separate from Cancel) in the 0.9 InlineEditBox?. Changing this to enhancement until its decided if there should be that function. onValueChanged() will be called when the value changes. onClick will be called when editing begins.

comment:9 Changed 14 years ago by Douglas Hays

Owner: changed from Douglas Hays to bill

InlineEditBox? being redesigned by bill

comment:10 Changed 14 years ago by bill

Milestone: 1.01.1

comment:11 Changed 14 years ago by bill

Milestone: 1.11.0
Resolution: fixed
Status: newclosed

OK, in the new dijit.InlineEditBox? there's a cancel() method that you can connect to (<script type="dojo/connect">) to find out when the user cancels.

Note: See TracTickets for help on using tickets.