Comments (12)
Hello everyone. Is no one going to merge either of those two fixes? This bug really breaks many use cases...
Thank you.
from ember-in-viewport.
@awaer @poteto
Looks like this addon (at least in version 1.2.5) doesn't handle case when the element is not in viewport from the very beginning (when _triggerDidAccessViewport
is called for the first time).
You can think of this like value of viewportEntered
property is changed from false
to false
(since the default value of viewportEntered
property is false
).
But _triggerDidAccessViewport
method only handles change of viewportEntered
property from true
to false
and from false
to true
.
from ember-in-viewport.
same issue here, I didn't know what was happening until I tried to add smaller elements. But, I can confirm that if the element (component) it's taller than the viewport the events aren't fired.
from ember-in-viewport.
@poteto any updates about this? or maybe @awaer already had any enlightenment?
from ember-in-viewport.
@patuku-roy I couldn't find a workaround. The nearest alternative addon (ember-waypoints
) doesn't meet my use case (and seems to be falling behind), so I opted for rolling my own solution that leans on scrollMonitor
. It's not ideal, but it works for now.
from ember-in-viewport.
Same here, I've tried to use ember-waypoint
but it seems using the same approach, I ended by splitting the ember-in-viewport
implementation into many smaller part of the DOM, for example: if I have div
contains image and text, then I put ember-in-viewport
for image only, because in my case, the image height always shorter than viewport height, this is not ideal solution but at least working on my problem now.
Btw I will take a look scrollMonitor
for the second option. Thanks anyway @awaer for your share.
from ember-in-viewport.
This is very annoying problem on narrow viewports :( When the element is wider than viewport.
from ember-in-viewport.
@poteto This still appears to be an issue. Elements taller or wider than the viewport do not trigger the enter/exit hooks. I notice that #62 attempts to fix the problem but hasn't been merged.
from ember-in-viewport.
@oligriffiths Could you try this in your package.json and let me know if it fixes your issue?
"ember-in-viewport": "DockYard/ember-in-viewport#0e31648"
from ember-in-viewport.
@poteto That sort of works, however if the element is initially loaded and partially outside of the viewport, then the enter hook isn't triggered. For example, if the element is partially shown but partially below the bottom of the viewport, the enter hook is not triggered.
from ember-in-viewport.
@poteto I've added 0e31648 to my package.json and it fixes this problem for me. I don't appear to be getting the same issue reported by @oligriffiths. It'd be great to see this branch merged into master so the dependency would be cleaner. Thanks!
from ember-in-viewport.
Any updates on this?
from ember-in-viewport.
Related Issues (20)
- Changelog HOT 1
- Failing to load more if items dont fill the screen HOT 1
- Pass more data back to callbacks
- Running Very Slowly HOT 9
- onExit doesn't get fired on IE HOT 3
- TypeError: Cannot read property 'viewportConfig' of undefined HOT 4
- Test failure in Ember 3.20
- Use {{in-viewport}} modifier multiple times on a page only trigger the last one's callback HOT 2
- Lazy load rAf implementation HOT 3
- onEvent(callback) API doesn't work HOT 1
- viewportSpy: false triggering onEnter everytime HOT 5
- Add enter/exit logging if enabled
- Bug in Ember 3.20 HOT 5
- onExit doesn't fire unless viewportSpy is enabled
- How to access didScroll using service method? HOT 1
- Safari/IOS Flicker Bug
- Update to ember-auto-import@2 HOT 2
- assign is deprecated
- Convert to v2 addon HOT 1
- Support % based rootMargin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-in-viewport.