Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2022-07-09 18:21:35 +0300
committerAleksander Machniak <alec@alec.pl>2022-07-09 18:21:35 +0300
commitedf9a3239e279d81585bc4b0ca4fab661df4a39c (patch)
tree72db0551912b4777f47c166c7c61eaa614a0e4ca
parent22e3373493f5c91db8548f605be6eec0842ea7ca (diff)
Fix attachment Options popover menu after attachment delete (#8602)
-rw-r--r--CHANGELOG.md1
-rw-r--r--skins/elastic/ui.js42
2 files changed, 23 insertions, 20 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 200a521d0..c5fec6b49 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
- Fix bug where a recipient address containing UTF-8 characters was ignored when sending an email (#8493, #8546)
- Fix so rcmail::contact_exists() works with IDNA addresses (#8545)
- Fix password option in `storage_init` hook after refreshing oauth access token (#8436)
+- Fix attachment Options popover menu after attachment delete (#8602)
## Release 1.6-rc
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js
index 605e64b41..96fdcd1c9 100644
--- a/skins/elastic/ui.js
+++ b/skins/elastic/ui.js
@@ -2428,28 +2428,30 @@ function rcube_elastic_ui()
if (popup_id && menus[popup_id] && popup.is(':visible')) {
menus[popup_id].transitioning = true;
}
- })
- .on('hidden.bs.popover', function() {
- if (/-clone$/.test(popup.attr('id'))) {
- popup.remove();
- }
- else {
- popup.attr('aria-hidden', true)
- // Some menus aren't being hidden, force that
- .addClass('hidden')
- // Bootstrap will detach the popup element from
- // the DOM (https://github.com/twbs/bootstrap/issues/20219)
- // making our menus to not update buttons state.
- // Work around this by attaching it back to the DOM tree.
- .appendTo(popup.data('popup-parent') || document.body);
- }
- // close orphaned popovers, for some reason there are sometimes such dummy elements left
- $('.popover-body:empty').each(function() { $(this).parent().remove(); });
+ // Note: We do not use hidden.bs.popover event because it is not always executed (#8602)
+ setTimeout(function () {
+ if (/-clone$/.test(popup.attr('id'))) {
+ popup.remove();
+ }
+ else {
+ popup.attr('aria-hidden', true)
+ // Some menus aren't being hidden, force that
+ .addClass('hidden')
+ // Bootstrap will detach the popup element from
+ // the DOM (https://github.com/twbs/bootstrap/issues/20219)
+ // making our menus to not update buttons state.
+ // Work around this by attaching it back to the DOM tree.
+ .appendTo(popup.data('popup-parent') || document.body);
+ }
- if (popup_id && menus[popup_id]) {
- delete menus[popup_id];
- }
+ // close orphaned popovers, for some reason there are sometimes such dummy elements left
+ $('.popover-body:empty').each(function() { $(this).parent().remove(); });
+
+ if (popup_id && menus[popup_id]) {
+ delete menus[popup_id];
+ }
+ }, 250);
})
// Because Bootstrap does not provide originalEvent in show/shown events
// we have to handle that by our own using click and keydown handlers