This commit is contained in:
Pascal 2024-12-18 15:51:38 +01:00 committed by Sosthene
parent b64adb3a9a
commit 0d71d9aa8b
2 changed files with 4 additions and 4 deletions

View File

@ -762,7 +762,7 @@ body {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: white; background-color: white;
z-index: 1000; /* Valeur élevée pour s'assurer qu'il est au-dessus des autres éléments */ z-index: 1000;
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;

View File

@ -198,13 +198,13 @@ class SignatureElement extends HTMLElement {
</div> </div>
</div>`; </div>`;
// Créer la modal dans le shadowDOM au lieu du document principal
const modalElement = document.createElement('div'); const modalElement = document.createElement('div');
modalElement.className = 'modal-overlay'; modalElement.className = 'modal-overlay';
modalElement.innerHTML = modalHtml; modalElement.innerHTML = modalHtml;
this.shadowRoot?.appendChild(modalElement); this.shadowRoot?.appendChild(modalElement);
// Sélectionner les éléments dans le shadowDOM
const slider = modalElement.querySelector('#signatureSlider'); const slider = modalElement.querySelector('#signatureSlider');
const sliderTrack = slider?.parentElement; const sliderTrack = slider?.parentElement;
let isDragging = false; let isDragging = false;
@ -1351,7 +1351,7 @@ class SignatureElement extends HTMLElement {
</div> </div>
`; `;
document.body.appendChild(modal); this.shadowRoot?.appendChild(modal);
const dropZone = modal.querySelector('#dropZone') as HTMLDivElement; const dropZone = modal.querySelector('#dropZone') as HTMLDivElement;
const fileInput = modal.querySelector('#fileInput') as HTMLInputElement; const fileInput = modal.querySelector('#fileInput') as HTMLInputElement;