refreshHard not working on disabled: mobile
See original GitHub issueI found this using Barba.js (PJAX), but tried just loading new elements in the DOM and using refreshHard()
. If the elements have an AOS attribute, then the styling will still be there (opacity: 0
).
I currently have a workaround to just run .init()
again whenever anything new comes into the DOM, but it seems like refreshHard()
should do this.
This is:
- Bug
Specifications
- AOS version: 2.3.4
- OS: Mac OS Catalina
- Browser: Chrome
Expected Behavior
refreshHard
should remove AOS attributes when new elements are added to the DOM when disabled.
Actual Behavior
Elements remain with initial AOS styling.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Aos - JavaScripting.com
init - initialize AOS; refresh - recalculate all offsets and positions of elements (called on window resize); refreshHard - reinit array with AOS...
Read more >aos/README.md - UNPKG
*Duration accept values from 50 to 3000, with step 50ms, it's because duration of animation is handled by css, and to not make...
Read more >How can I force a hard reload in Chrome for Android
I'm using window.location.reload(true) according to MDN (and this similar question) it forces page to reload from server. You can execute this code in...
Read more >Images missing when a3 lay load and wp-optimize minify ...
So, i decided to disable the “Process Javascript files” in WP-O settings because it is simpler than try to resolve all my issues,...
Read more >Aos NPM - npm.io
... with step 50ms disable: false, // accepts following values: 'phone', 'tablet', ... check AOS contribution guide and don't hesitate to create new...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@namesjamesryan Are you using Barba V2? I just had to run
.init()
again.https://github.com/thomasvaeth/thomasvaeth.github.io/blob/master/_assets/js/_inits.js
I was using AOS v2.3.4 for all the projects I was using Barba v2. I know he changed AOS v3 a lot, so maybe try v2 until there is a stable release.