mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-12-04 22:16:37 +01:00
feat: more changes and fixes
This commit is contained in:
1 parent
2afb6b1f5f
commit
7e37948616
41 files changed
+480
-432
No files matched your search
@@ -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