upstream/2026.7.0 #21

Merged
simon merged 194 commits from upstream/2026.7.0 into master 2026-08-01 15:33:26 +00:00
2 changed files with 24 additions and 4 deletions
Showing only changes of commit 2381af4267 - Show all commits
@@ -60,8 +60,18 @@ export function createButtonInstance (element: Element, htmlId?: string): App {
app.config.errorHandler = (error, _vm, info) => {
console.error('[pretix-button]', info, error)
}
app.mount(element)
observer.observe(element, { attributes: true })
// Instead of mounting to the element directly, replicate vue2.7 behaviour, where
// the HTML-element gets replaced instead of vue3s behaviour to replace innerHTML.
// The latter can cause issues with custom CSS as HTML structure would change.
// app.mount(element)
// observer.observe(element, { attributes: true })
const fragment = document.createDocumentFragment()
app.mount(fragment)
for (const attr of element.attributes) {
fragment.firstChild.setAttribute(attr.name, attr.value)
}
observer.observe(fragment.firstChild, { attributes: true })
element.parentNode.replaceChild(fragment, element)
return app
}
@@ -56,8 +56,18 @@ export function createWidgetInstance (element: Element, htmlId?: string): App {
app.config.errorHandler = (error, _vm, info) => {
console.error('[pretix-widget]', info, error)
}
app.mount(element)
observer.observe(element, { attributes: true })
// Instead of mounting to the element directly, replicate vue2.7 behaviour, where
// the HTML-element gets replaced instead of vue3s behaviour to replace innerHTML.
// The latter can cause issues with custom CSS as HTML structure would change.
// app.mount(element)
// observer.observe(element, { attributes: true })
const fragment = document.createDocumentFragment()
app.mount(fragment)
for (const attr of element.attributes) {
fragment.firstChild.setAttribute(attr.name, attr.value)
}
observer.observe(fragment.firstChild, { attributes: true })
element.parentNode.replaceChild(fragment, element)
return app
}