Explorar o código

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

Sandro Gehri hai 1 ano
pai
achega
6dcfefc973
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
                     }
                 })