diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 816c88988..8b78cbfb0 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -386,6 +386,18 @@ define([ if (modalParents.length > 0) { me.btnEl.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10); me.btnMenuEl && me.btnMenuEl.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10); + var onModalClose = function(dlg) { + if (modalParents[0] !== dlg.$window[0]) return; + var tip = me.btnEl.data('bs.tooltip'); + if (tip) { + if (tip.dontShow===undefined) + tip.dontShow = true; + + tip.hide(); + } + Common.NotificationCenter.off({'modal:close': onModalClose}); + }; + Common.NotificationCenter.on({'modal:close': onModalClose}); } } diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index 8b24e3caf..02d7cadde 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -194,6 +194,18 @@ define([ var modalParents = el.closest('.asc-window'); if (modalParents.length > 0) { el.data('bs.tooltip').tip().css('z-index', parseInt(modalParents.css('z-index')) + 10); + var onModalClose = function(dlg) { + if (modalParents[0] !== dlg.$window[0]) return; + var tip = el.data('bs.tooltip'); + if (tip) { + if (tip.dontShow===undefined) + tip.dontShow = true; + + tip.hide(); + } + Common.NotificationCenter.off({'modal:close': onModalClose}); + }; + Common.NotificationCenter.on({'modal:close': onModalClose}); } el.find('.dropdown-menu').on('mouseenter', function(){ // hide tooltip when mouse is over menu