You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#270 added the viewportSpy option which means that if it is disabled, after onEnter, stopWatching is called.
This makes sense if you're only considering onEnter but if onExit is defined, then it is counterintuitive that it never gets called unless viewportSpy is set to true.
It took me a while to realise why {{in-viewport onEnter=this.onEnter onExit=this.onExit}} only called my onEnter handler.
#270 added the
viewportSpy
option which means that if it is disabled, afteronEnter
,stopWatching
is called.This makes sense if you're only considering
onEnter
but ifonExit
is defined, then it is counterintuitive that it never gets called unlessviewportSpy
is set to true.It took me a while to realise why
{{in-viewport onEnter=this.onEnter onExit=this.onExit}}
only called myonEnter
handler.I would propose a change to the check on
ember-in-viewport/addon/modifiers/in-viewport.js
Line 45 in e052a89
The text was updated successfully, but these errors were encountered: