mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-26 10:38:36 +02:00
feat: more changes and fixes
This commit is contained in:
@@ -23,10 +23,11 @@ window.TomSelect = function createDynamicTomSelect(element) {
|
||||
},
|
||||
},
|
||||
|
||||
onInitialize: function () {
|
||||
onDropdownOpen: function () {
|
||||
// Move dropdown to body to escape stacking context issues
|
||||
document.body.appendChild(this.dropdown);
|
||||
|
||||
|
||||
this.popper = Popper.createPopper(this.control, this.dropdown, {
|
||||
placement: "bottom-start",
|
||||
strategy: "fixed",
|
||||
@@ -58,11 +59,9 @@ window.TomSelect = function createDynamicTomSelect(element) {
|
||||
});
|
||||
|
||||
},
|
||||
onDropdownOpen: function () {
|
||||
this.popper.update();
|
||||
},
|
||||
onDropdownClose: function () {
|
||||
// Optional: move back to wrapper to keep DOM clean, but not necessary
|
||||
this.popper.destroy();
|
||||
this.dropdown.remove();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user