@brandocms/jupiter 3.42.6 → 3.42.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ #### 3.42.7
2
+
3
+ - Links: Check for zero opacity body element on back/forward nav
4
+
5
+
1
6
  #### 3.42.6
2
7
 
3
8
  - Typography: Better defaults
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brandocms/jupiter",
3
- "version": "3.42.6",
3
+ "version": "3.42.7",
4
4
  "description": "Frontend helpers.",
5
5
  "author": "Univers/Twined",
6
6
  "license": "UNLICENSED",
@@ -15,8 +15,19 @@ gsap.defaults({ overwrite: 'auto', ease: 'sine.out' })
15
15
 
16
16
  window.onpageshow = event => {
17
17
  if (event.persisted) {
18
- gsap.to(document.querySelector('#fader'), { duration: 0.35, autoAlpha: 0 })
19
- gsap.to(document.querySelectorAll('[data-fader]'), { duration: 0.35, autoAlpha: 0 })
18
+ const f = document.querySelector('#fader')
19
+ if (f) {
20
+ gsap.to(f, { duration: 0.35, autoAlpha: 0 })
21
+ }
22
+
23
+ const dataFaders = document.querySelectorAll('[data-fader]')
24
+ if (dataFaders.length) {
25
+ gsap.to(dataFaders, { duration: 0.35, autoAlpha: 0 })
26
+ }
27
+
28
+ gsap.set(document.body, {
29
+ clearProps: 'opacity'
30
+ })
20
31
  }
21
32
  }
22
33