Mozilla/mozilla/editor/ui/dialogs/content/EdDialogCommon.js
cmanske%netscape.com c7e403b56c Fixed infinite loop in dialog Cancel hander
git-svn-id: svn://10.0.0.236/trunk@30648 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-07 01:54:38 +00:00

26 lines
541 B
JavaScript

function onUndo() {
if (undoCount > 0)
{
dump("Undo count = "+undoCount+"\n");
undoCount = undoCount - 1;
appCore.undo();
}
}
function onOK() {
applyChanges();
//TODO: Allow this after bug 6005 is fixed
//toolkitCore.CloseWindow(window);
}
function onCancel() {
// Undo all actions performed within the dialog
// TODO: We need to suppress reflow/redraw untill all levels are undone
while (undoCount > 0) {
onUndo();
}
//TODO: Allow this after bug 6005 is fixed
//toolkitCore.CloseWindow(window);
}