We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f9d762 commit 59868bbCopy full SHA for 59868bb
src/transition/transition.js
@@ -379,9 +379,16 @@ p.setupCssCb = function (event, cb) {
379
*/
380
381
function isHidden (el) {
382
- return !(
383
- el.offsetWidth ||
384
- el.offsetHeight ||
385
- el.getClientRects().length
386
- )
+ if (/svg$/.test(el.namespaceURI)) {
+ // SVG elements do not have offset(Width|Height)
+ // so we need to check the client rect
+ var rect = el.getBoundingClientRect()
+ return !(rect.width || rect.height)
387
+ } else {
388
+ return !(
389
+ el.offsetWidth ||
390
+ el.offsetHeight ||
391
+ el.getClientRects().length
392
+ )
393
+ }
394
}
0 commit comments