@lemonadejs/modal 5.2.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -8
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -390,7 +390,10 @@ if (!lemonade && typeof (require) === 'function') {
|
|
|
390
390
|
|
|
391
391
|
if (self.position === 'absolute') {
|
|
392
392
|
if (bottomEdgeDistance < 5) {
|
|
393
|
-
transformY = (-1 * el.height) - margin -
|
|
393
|
+
transformY = (-1 * el.height) - margin - 12;
|
|
394
|
+
if (el.top + transformY < 0) {
|
|
395
|
+
transformY = -el.top + 10;
|
|
396
|
+
}
|
|
394
397
|
}
|
|
395
398
|
} else {
|
|
396
399
|
if (bottomEdgeDistance < 0) {
|
|
@@ -784,8 +787,10 @@ if (!lemonade && typeof (require) === 'function') {
|
|
|
784
787
|
}
|
|
785
788
|
|
|
786
789
|
// Auto adjust
|
|
787
|
-
|
|
788
|
-
|
|
790
|
+
queueMicrotask(() => {
|
|
791
|
+
adjustHorizontal(self);
|
|
792
|
+
adjustVertical(self);
|
|
793
|
+
});
|
|
789
794
|
} else {
|
|
790
795
|
// Hide backdrop
|
|
791
796
|
if (backdrop) {
|
|
@@ -799,11 +804,15 @@ if (!lemonade && typeof (require) === 'function') {
|
|
|
799
804
|
self.el.style[property] = '';
|
|
800
805
|
}
|
|
801
806
|
|
|
802
|
-
if (
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
+
if (self.closed === false) {
|
|
808
|
+
queueMicrotask(() => {
|
|
809
|
+
if (property === 'top') {
|
|
810
|
+
adjustVertical(self);
|
|
811
|
+
}
|
|
812
|
+
if (property === 'left') {
|
|
813
|
+
adjustHorizontal(self);
|
|
814
|
+
}
|
|
815
|
+
});
|
|
807
816
|
}
|
|
808
817
|
} else if (property === 'position') {
|
|
809
818
|
if (self.position) {
|
package/dist/style.css
CHANGED