@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
|
@@ -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(
|
|
152
|
+
urlTarget.scrollIntoView();
|
|
153
|
+
} else if (vieportTop = Array.from(document.querySelectorAll('[data-viewport-top]')).pop()) {
|
|
154
|
+
vieportTop.focus();
|
|
152
155
|
} else {
|
|
153
|
-
|
|
156
|
+
document.body.scrollIntoView();
|
|
154
157
|
}
|
|
155
158
|
setTimeout(() => {
|
|
156
159
|
document.documentElement.classList.remove('scroll-reset');
|
|
157
|
-
},
|
|
160
|
+
}, 600);
|
|
158
161
|
}, 0);
|
|
159
162
|
}
|
|
160
163
|
|