Browse Source

collapse: remove overflow hidden even if height does not match perfect (#4203)

Sandro Gehri 1 year ago
parent
commit
6dcfefc973
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/collapse/src/index.js

+ 1 - 1
packages/collapse/src/index.js

@@ -56,7 +56,7 @@ export default function (Alpine) {
                     start: { height: current+'px' },
                     end: { height: full+'px' },
                 }, () => el._x_isShown = true, () => {
-                    if (el.getBoundingClientRect().height == full) {
+                    if (Math.abs(el.getBoundingClientRect().height - full) < 1) {
                         el.style.overflow = null
                     }
                 })