io-sanita-theme 2.16.2 → 2.16.3

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,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.16.3](https://github.com/RedTurtle/io-sanita-theme/compare/2.16.2...2.16.3) (2025-06-11)
4
+
5
+ ### Bug Fixes
6
+
7
+ * handle Anchor in search block with query ([75a171a](https://github.com/RedTurtle/io-sanita-theme/commit/75a171ab0d65b817dbc41b1290da887ceaf373bb))
8
+
3
9
  ## [2.16.2](https://github.com/RedTurtle/io-sanita-theme/compare/2.16.1...2.16.2) (2025-06-03)
4
10
 
5
11
  ### Bug Fixes
package/docs/logo.png CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.16.2",
3
+ "version": "2.16.3",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -8,12 +8,17 @@ const HandleAnchor = () => {
8
8
  if (location.hash) {
9
9
  // eslint-disable-next-line no-unused-expressions
10
10
  const _id = location.hash.replace('#', '');
11
- const ref = document.querySelector('#' + _id);
12
- ref.focus();
11
+ if (!_id.startsWith('query=')) {
12
+ //nel blocco 'search' quando si applicano dei filtri, viene aggiunta all'url la query preceduta da '#query=' che in quel caso non si tratta di un'àncora
13
+ const ref = document.querySelector('#' + _id);
14
+ if (ref) {
15
+ ref.focus();
13
16
 
14
- setTimeout(() => {
15
- scrollIntoView({ ref });
16
- }, 30);
17
+ setTimeout(() => {
18
+ scrollIntoView({ ref });
19
+ }, 30);
20
+ }
21
+ }
17
22
  }
18
23
  }, [location]);
19
24
  return <></>;