Skip to content

Commit ff1c824

Browse files
committed
fix(Intersection): correctly handle case when directive is applied to native element quasarframework#6526
1 parent 215eaf6 commit ff1c824

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ui/src/directives/Intersection.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ function update (el, ctx, { modifiers, value }) {
3131
ctx.observer !== void 0 && ctx.observer.unobserve(el)
3232

3333
ctx.observer = new IntersectionObserver(([ entry ]) => {
34-
if (typeof ctx.handler === 'function' && el.__vue__._inactive !== true) {
35-
if (entry.rootBounds === null) {
36-
ctx.observer.unobserve(el)
37-
ctx.observer.observe(el)
38-
39-
return
40-
}
41-
34+
if (
35+
typeof ctx.handler === 'function' &&
36+
(el.__vue__ !== void 0 ? el.__vue__._inactive !== true : document.body.contains(el) === true)
37+
) {
4238
const res = ctx.handler(entry, ctx.observer)
4339

4440
if (

0 commit comments

Comments
 (0)