[fix] website summernote: last button of the table update raise for wrong history call

This commit is contained in:
Christophe Matthieu
2015-02-12 11:58:12 +01:00
committed by Julien De Coster
parent ebc5b3b11b
commit 83c4222601
+4 -4
View File
@@ -2051,9 +2051,9 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor)
});
var $table = $(table);
$dels.on('mousedown', function (event) {
$dels.data('table', table).on('mousedown', function (event) {
var td = $(this).data('td');
$(td).closest('.note-editable').data('NoteHistory').recordUndo($editable);
$editable.data('NoteHistory').recordUndo($editable);
var newTd;
if ($(td).siblings().length) {
@@ -2076,9 +2076,9 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor)
range.create(newTd[0], 0, newTd[0], 0).select();
newTd.trigger('mouseup');
});
$adds.on('mousedown', function (event) {
$adds.data('table', table).on('mousedown', function (event) {
var td = $(this).data('td');
$(td).closest('.note-editable').data('NoteHistory').recordUndo($editable);
$editable.data('NoteHistory').recordUndo($editable);
var newTd;
if (td) {