From 94f59548b7e48d37156bcf0dbc68877c76b0f16f Mon Sep 17 00:00:00 2001 From: Uriel Gomez Date: Wed, 17 Jul 2024 13:00:47 -0600 Subject: [PATCH] * xover.listener.on('render?location.hash' - bug fixed * xover.site.setter - restored prop assignation to fix navigation problems --- xo.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xo.js b/xo.js index 35f6f54..93e80cc 100644 --- a/xo.js +++ b/xo.js @@ -1384,7 +1384,9 @@ xover.listener.on('hashchange', function () { }); xover.listener.on('render?location.hash', function () { - let target = this.querySelector(location.hash); + let hash = top.location.hash || '#'; + hash = hash.split(/\?/)[0]; + let target = this.querySelector(hash); if (target) { target.scrollIntoView() } @@ -2048,7 +2050,7 @@ xover.site = new Proxy(Object.assign({}, history.state), { window.dispatchEvent(new Event('hashchange')); } } - if (key === 'seed' && self['active'] != new_value) self['active'] = new_value; + if (key === 'seed') self['active'] = new_value; for (let [subscriber] of xover.subscribers.site[key]) { subscriber.evaluate() }