Skip to content

Commit 6924687

Browse files
committed
Handsontable undo workaround.
1 parent ab2b4c6 commit 6924687

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

client/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,8 @@ <h3>Additional Questions</h3>
192192
};
193193
submissionHandling(inputSources, '/');
194194
});
195-
196195
});
197196
</script>
198197
</div>
199198
</body>
200-
</html>
199+
</html>

client/script/ssCreate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ var makeTable = function (divID, tableConfig) {
104104
&& validateSum(value, colValues);
105105
}
106106
},
107+
beforeChange: function (changes, source) {
108+
// Workaround for handsontable undo issue
109+
if (this.readOnly) {
110+
return false;
111+
}
112+
},
107113
cells: function (row, col, prop) {
108114
var cellProperties = {},
109115
isReadOnly = this.instance.getSettings().readOnly;

0 commit comments

Comments
 (0)