|
1 | 1 | import { moveInstrumentation } from './ue-utils.js'; |
2 | 2 |
|
3 | 3 | const setupObservers = () => { |
4 | | - const mutatingBlocks = document.querySelectorAll('div.cards, div.journey-map'); |
| 4 | + const mutatingBlocks = document.querySelectorAll('div.cards, div.journey-map, div.form'); |
5 | 5 | const observer = new MutationObserver((mutations) => { |
6 | 6 | mutations.forEach((mutation) => { |
7 | 7 | if (mutation.type === 'childList' && mutation.target.tagName === 'DIV') { |
@@ -72,24 +72,6 @@ const setupUEEventHandlers = () => { |
72 | 72 | picture?.querySelector('img')?.removeAttribute('srcset'); |
73 | 73 | }); |
74 | 74 |
|
75 | | - // When embedUrl is updated, copy to embedUrlText if empty so the URL is retained |
76 | | - document.body.addEventListener('aue:content-patch', ({ detail: { patch, request } }) => { |
77 | | - if (patch.name !== 'embedUrl') return; |
78 | | - |
79 | | - const element = document.querySelector(`[data-aue-resource="${request.target.resource}"]`); |
80 | | - if (!element) return; |
81 | | - |
82 | | - const anchor = element.getAttribute('data-aue-prop') === 'embedUrl' |
83 | | - ? element |
84 | | - : element.querySelector('[data-aue-prop="embedUrl"]') || element.querySelector('a[href]'); |
85 | | - if (!anchor || anchor.tagName !== 'A') return; |
86 | | - |
87 | | - const url = patch.value || anchor.getAttribute('href') || ''; |
88 | | - if (url && (!anchor.textContent || !anchor.textContent.trim())) { |
89 | | - anchor.textContent = url; |
90 | | - } |
91 | | - }); |
92 | | - |
93 | 75 | document.body.addEventListener('aue:ui-select', (event) => { |
94 | 76 | const { detail } = event; |
95 | 77 | const resource = detail?.resource; |
|
0 commit comments