diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-21 18:00:16 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-01-23 12:14:15 +0100 |
| commit | 64b0c36f168abddc4e798712f0812202e5c0b8b6 (patch) | |
| tree | c2d4744cb45b9ea90b8e0a5ab8a5ae6788b526eb /addons/website/static/lib/summernote/src/js | |
| parent | 1c4e6c87a0b7705679fe1d12c6a0098cbe8a97fb (diff) | |
[FIX] summernote lib: scroll to top when click on input in editable mode
Diffstat (limited to 'addons/website/static/lib/summernote/src/js')
| -rw-r--r-- | addons/website/static/lib/summernote/src/js/editing/Editor.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/static/lib/summernote/src/js/editing/Editor.js b/addons/website/static/lib/summernote/src/js/editing/Editor.js index c3a2d54f629..5edf5e30b0f 100644 --- a/addons/website/static/lib/summernote/src/js/editing/Editor.js +++ b/addons/website/static/lib/summernote/src/js/editing/Editor.js @@ -41,7 +41,10 @@ define([ * @param {jQuery} $editable */ this.saveRange = function ($editable, thenCollapse) { - $editable.focus(); + var r = range.create(); + if (!r || ($editable[0] !== r.sc && !$.contains($editable[0], r.sc))) { + $editable.focus(); + } $editable.data('range', range.create()); if (thenCollapse) { range.create().collapse().select(); |
