summaryrefslogtreecommitdiff
path: root/addons/base_import_module
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-07-10 12:07:37 +0200
committerAlexandre Kühn <aku@odoo.com>2018-07-10 15:25:02 +0200
commitfb98bb009af00124d726a56193e8827d6f42c1fb (patch)
tree97d200c26101669eaad1646b74ff18ac22bb2720 /addons/base_import_module
parent937c2fc70841e39031100662db74d793ce68a8ea (diff)
[FIX] mail: remove attachment when clicking on white cross icon
Before this commit, we could not remove an attachment in the composer by clicking on the white-cross icon that is shown on mouse hover. This was due to the handler function picking the wrong DOM element as target for reading on the attachment ID: it should pick the target of this handler function, and not the specific target below the mouse on click. For instance, let's consider this HTML snippet for the button: ``` <div class='delete' data-attachment-id=100> <span class='cross-icon'>X</span> </div> ``` where the handler function is called when clicking on `div.delete`. When we click on `span.cross-icon`, it triggers the handler function of `div.delete`. The MouseEvent object contains the following property values: - `target`: the `<span>` element - `currentTarget`: the `<div>` element The handler function of `div.delete` deletes an attachment by looking into the `data-attachment-id` attribute of `div.delete`. It should always pick `div.delete`, even when the user clicks on `span.cross-icon`.
Diffstat (limited to 'addons/base_import_module')
0 files changed, 0 insertions, 0 deletions