mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
parent
640ac2330f
commit
87ae085e6d
2 changed files with 22 additions and 2 deletions
|
|
@ -158,7 +158,11 @@
|
|||
margin-left: 0;
|
||||
}
|
||||
.pop-over .content-container .content.no-height {
|
||||
height: 2.5vh;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
.pop-over .quiet {
|
||||
/* padding: 6px 6px 4px;*/
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ window.Popup = new (class {
|
|||
return;
|
||||
} else {
|
||||
$(previousOpenerElement).removeClass('is-active');
|
||||
// Clean up previous popup content to prevent mixing
|
||||
self._cleanupPreviousPopupContent();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +60,12 @@ window.Popup = new (class {
|
|||
if (clickFromPopup(evt) && self._getTopStack()) {
|
||||
openerElement = self._getTopStack().openerElement;
|
||||
} else {
|
||||
self._stack = [];
|
||||
// For Member Settings sub-popups, always start fresh to avoid content mixing
|
||||
if (popupName.includes('changeLanguage') || popupName.includes('changeAvatar') ||
|
||||
popupName.includes('editProfile') || popupName.includes('changePassword') ||
|
||||
popupName.includes('invitePeople') || popupName.includes('support')) {
|
||||
self._stack = [];
|
||||
}
|
||||
openerElement = evt.currentTarget;
|
||||
}
|
||||
$(openerElement).addClass('is-active');
|
||||
|
|
@ -169,6 +176,8 @@ window.Popup = new (class {
|
|||
$(openerElement).removeClass('is-active');
|
||||
|
||||
this._stack = [];
|
||||
// Clean up popup content when closing
|
||||
this._cleanupPreviousPopupContent();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -182,6 +191,13 @@ window.Popup = new (class {
|
|||
return this._stack[this._stack.length - 1];
|
||||
}
|
||||
|
||||
_cleanupPreviousPopupContent() {
|
||||
// Force a re-render to ensure proper cleanup
|
||||
if (this._dep) {
|
||||
this._dep.changed();
|
||||
}
|
||||
}
|
||||
|
||||
// We automatically calculate the popup offset from the reference element
|
||||
// position and dimensions. We also reactively use the window dimensions to
|
||||
// ensure that the popup is always visible on the screen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue