Fix: lukk i fullskjerm flytter DOM-element tilbake fra body
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2fbb658c61
commit
2d44a8d1af
1 changed files with 15 additions and 1 deletions
|
|
@ -410,7 +410,21 @@
|
|||
{#if closable}
|
||||
<button
|
||||
class="blockshell-btn blockshell-btn-close"
|
||||
onclick={(e) => { e.stopPropagation(); isFullscreen = false; onClose?.(); }}
|
||||
onclick={(e) => {
|
||||
e.stopPropagation();
|
||||
// Flytt tilbake fra body før Svelte fjerner komponenten
|
||||
if (isFullscreen && containerEl && originalParent) {
|
||||
if (originalNextSibling) {
|
||||
originalParent.insertBefore(containerEl, originalNextSibling);
|
||||
} else {
|
||||
originalParent.appendChild(containerEl);
|
||||
}
|
||||
originalParent = null;
|
||||
originalNextSibling = null;
|
||||
}
|
||||
isFullscreen = false;
|
||||
onClose?.();
|
||||
}}
|
||||
title="Lukk"
|
||||
aria-label="Lukk panel"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue