The attached HTML has a problem. When I use a popup window and cancel the closing of a window with field changes, the Save button is triggered even though it has not yet been clicked. Below is the trace in the console log displays. Note that the bottom lines indicate the Save button has been triggered and the changes saved to the datasource. Yet, it has not been clicked.
pid: 2
row: Object { _events={...}, _handlers={...}, ProductID=2, more...}
set: e.field = current
current: Object { _events={...}, _handlers={...}, ProductID=2, more...}
set: e.field = current.UnitPrice
set: fName = UnitPrice
set: hasChanges = true
close: e.userTriggered = true
close: hasChanges is true
click: #CancelButton
click: Save
changes: UnitPrice changed from 21 to 20,
close: e.userTriggered = true
close: hasChanges is true
My expectation was that if I called e.preventDefault that the window close would be stopped and that would be that. For some reason the Save button is involved. Using the confirm code works fine. But I would like better control and it looks less refined than a popup window that can have more messages and maybe even links to help.
Weird. And, it's not even Halloween yet. That's next week.
Rick