diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-29 11:01:46 +0100 |
|---|---|---|
| committer | Julien De Coster <jdc@odoo.com> | 2015-02-12 11:58:12 +0100 |
| commit | 83c422260108a67c0b29375e212e15563cf6a342 (patch) | |
| tree | def136b6ab2185290ca838dfe5e2c3f3f1b7d623 | |
| parent | ebc5b3b11b0ff94113c4af0333a562ef26159072 (diff) | |
[fix] website summernote: last button of the table update raise for wrong history call
| -rw-r--r-- | addons/website/static/src/js/summernote.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/website/static/src/js/summernote.js b/addons/website/static/src/js/summernote.js index 83c9b519ace..616f96be5c3 100644 --- a/addons/website/static/src/js/summernote.js +++ b/addons/website/static/src/js/summernote.js @@ -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) { |
