diff options
| author | Antoine Guenet <age@odoo.com> | 2019-03-08 14:05:30 +0000 |
|---|---|---|
| committer | Antoine Guenet <age@odoo.com> | 2019-03-08 14:41:49 +0000 |
| commit | c9b1401a23cd984f9ff93559a8f171537128c7fc (patch) | |
| tree | e494179d548d0998ac074f63b508b5a67efb06e4 /addons/base_import/static/lib/javascript-state-machine/RELEASE_NOTES.md | |
| parent | 7afd23e56c6cfe6d1f5b5bbcb08911f79cccd9ff (diff) | |
[FIX] web_editor: update the handle on click input node in website edit
When clicking on a snippet containing an input node on Firfeox, the
handle wouldn't appear as expected. This is due to trying JQuery (but
not only) trying to modify properties that are restricted on Firefox but
not on Chrome. The error message still appears from time to time due to
Summernote using `document.getSelection`, which is problematic with
Firefox. This will be fixed with the next version of the editor. In the
meantime the direct effect of that error (the handle issue) is fixed
with this commit.
The standard target (`Event.target`) is now looked for in first position
instead of non-standard 'Event.srcElement` (IE alias for `Event.target`)
then `Event.originalTarget` (Mozilla-specific) and finally
`Event.target` (standard). `Event.originalTarget` is restricted on
Firefox so it was giving the same cryptic error as mentioned above
("Error: Permission denied to access property", which generally points
to same-origin policy violations).
Ref:
- https://developer.mozilla.org/en-US/docs/Web/API/Event/srcElement
- https://developer.mozilla.org/en-US/docs/Web/API/Event/originalTarget
- https://developer.mozilla.org/en-US/docs/Web/API/Event/target
- https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection#Related_objects
- https://developer.mozilla.org/en-US/docs/web/javascript/reference/errors/property_access_denied
closes odoo/odoo#31710
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/base_import/static/lib/javascript-state-machine/RELEASE_NOTES.md')
0 files changed, 0 insertions, 0 deletions
