@webqit/webflo 0.8.61 → 0.8.62

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/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.8.61",
15
+ "version": "0.8.62",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -147,14 +147,17 @@ export default function(layout, params) {
147
147
  if (/*document.activeElement === document.body && */event && _isObject(event.detail) && (event.detail.src instanceof Element) && /* do only on url path change */ _before(event.value, '?') !== _before(event.oldValue, '?')) {
148
148
  document.documentElement.classList.add('scroll-reset');
149
149
  setTimeout(() => {
150
+ let vieportTop;
150
151
  if (clientNavigationEvent.url.hash && (urlTarget = document.querySelector(clientNavigationEvent.url.hash))) {
151
- urlTarget.scrollIntoView(true);
152
+ urlTarget.scrollIntoView();
153
+ } else if (vieportTop = Array.from(document.querySelectorAll('[data-viewport-top]')).pop()) {
154
+ vieportTop.focus();
152
155
  } else {
153
- window.scroll({top: 0, left: 0});
156
+ document.body.scrollIntoView();
154
157
  }
155
158
  setTimeout(() => {
156
159
  document.documentElement.classList.remove('scroll-reset');
157
- }, 400);
160
+ }, 600);
158
161
  }, 0);
159
162
  }
160
163