PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/modules/block-library/accordion/view.js +2 -5 23.7.2 → trunk View file →
@@ -35,17 +35,14 @@
35 35 accordionItem.isOpen = !accordionItem.isOpen;
36 36 }
37 37 },
38 38 openPanelByHash: () => {
39 - if (hashHandled || !window.location?.hash?.length) {
39 + if (hashHandled) {
40 40 return;
41 41 }
42 42 const context = getContext();
43 43 const { id, accordionItems, autoclose } = context;
44 - const hash = decodeURIComponent(
45 - window.location.hash.slice(1)
46 - );
47 - const targetElement = window.document.getElementById(hash);
44 + const targetElement = document.querySelector(":target");
48 45 if (!targetElement) {
49 46 return;
50 47 }
51 48 const panelElement = window.document.querySelector(