summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/lib/summernote/src/js/EventHandler.js
AgeCommit message (Collapse)Author
2020-06-05[FIX] web_editor: fix layoutInfo is null tracebackSamuel Degueldre
When attempting to update its UI in reaction to events, summernote tries to make layout info for the event target, this relies on finding this information on one of the target's ancestors. In some cases, elements can be removed from the DOM between the moment the event was triggered, and the moment summernote attempts to create the layoutInfo, resulting in layoutInfo being null. This commit prevents tracebacks from happening in such cases by checking that a layoutInfo was actually returned, and if not, aborting the UI update that relies on it. closes odoo/odoo#52541 X-original-commit: 3e999db0c114d51102ae51f870f98a4cc276c4b4 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-21[REV] web_editor: revert summernote updateGorash
Summernote was updated alongside the new editor of saas-12.2. However, since we are putting back the editor of 12.0, summernote needs to be downgraded back to the version that was compatible with the 12.0 editor. This is a revert of 17c6d005. Part of PR 35677. Co-authored-by: Nicolas Bayet <nby@odoo.com> Co-authored-by: Antoine Guenet <age@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com>
2019-01-17[IMP] web_editor,*: Update the Summernote libraryChristophe Matthieu
The refactoring of the wysiwyg editor and 'html' field allow for the update of the Summernote library.
2018-11-22[MERGE] forward port branch saas-15 up to e44c35f4074Christophe Simonis
2018-11-15[FIX] web_editor: firefox `´ accent no break positionNicolas Lempereur
On firefox if we do for example: ALT+GR + [ALT+GRable ´ key] Firefox may send keys "AltGr" and "Dead" instead of just "AltGr". This was possibly causing caret to go a position too low when writing speedily with diacritical marks. opw-1903865 closes #28739
2018-09-03[FIX] web_editor: focus lost with inline editorNicolas Lempereur
When an inline editor is eg. in a form view, the focus is always stolen by it. This is because we trigger a mouseup on the editor to update its toolbars values and informations. In 10.0 this was not necessary since the default values were sanely set when the editor was inside the DOM. In 11.0 the editor is not in the DOM when this is being done and the info was wrong (eg. NaN for text size). With this commit, we don't steal the focus and get the default like it was done in 10.0 instead. fixes #26366 opw-1874880 closes #26582
2018-05-08[FIX] web_editor: drag and dropNicolas Martinelli
Commit 6494f511718 introduces an access token to read images inside an email. This avoids access errors when accessing the email through a proxy (e.g. Gmail). That implies that all images are added as attachments. When going through the usual media dialog, the form is submitted to action '/web_editor/attachment/add', creating the attachment. However, the copy or the drag and drop of an image completely fails. Indeed, the same method `_onImageUpload` is called, but with a completely different argument type: `attachments` is a `FileList`, not a list of attachments. To solve this, we only call `_onImageUpload` on a the custom `onUpload` callback, which is not triggered during a drag and drop or a copy. Any image included thanks to these methods will be post-processed in the `create` method of `mail.message` (`base64_to_boundary`). Unfortunately, it's not possible to simulate an actual drag and drop or a copy, so we cannot add a test. opw-1840237 opw-1840411
2017-05-04[FIX] web_editor: prevent crash when publishing a payment in edit modeChristophe Matthieu
When updateStyleInfo is called, the options is not necessarily on editable area (eg: when update the toolbar for image)
2015-09-29[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-09-25Revert "[IMP] web_editor: update summernote up to 2015-08-31"Nicolas Lempereur
Revert till several issues are solved.
2015-09-25[IMP] web_editor: update summernote up to 2015-08-31Nicolas Lempereur
update summernote library up to revision: https://github.com/summernote/summernote/commit/a0f26e300 see https://github.com/summernote/summernote/ for history closes #8704
2015-07-10[FIX] summernote: wrong history managment fixed to use in normal field editorChristophe Matthieu
2015-07-10[FIX] web_editor: summernote: editor fail if at least 10 instance of ↵Christophe Matthieu
summernote are create (wrong split to get sumernote instance id)
2015-07-10[IMP] web_editor: move summernote & nearest lib from websiteChristophe Matthieu