correction autocomplete
This commit is contained in:
parent
75bff25eb0
commit
9f1cad89be
@ -1,12 +1,17 @@
|
||||
/* Styles pour l'autocomplétion des présences dans la modal de validation des présences */
|
||||
|
||||
/* Le conteneur td doit être en position relative pour le positionnement absolu des suggestions */
|
||||
#presence_rows td {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.presence-nom-input {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.autocomplete-suggestions {
|
||||
position: absolute;
|
||||
z-index: 1050;
|
||||
z-index: 1060;
|
||||
background: white;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
@ -14,7 +19,6 @@
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
margin-top: 2px;
|
||||
width: 100%;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
|
||||
@ -733,6 +733,19 @@ function initializePresenceAutocomplete() {
|
||||
suggestionsDiv.appendChild(suggestionItem);
|
||||
});
|
||||
|
||||
// Positionner la div de suggestions sous le champ nom
|
||||
const nomInputRect = nomInput.getBoundingClientRect();
|
||||
const parentCell = nomInput.closest('td');
|
||||
|
||||
if (parentCell) {
|
||||
// Position relative au td parent
|
||||
suggestionsDiv.style.position = 'absolute';
|
||||
suggestionsDiv.style.top = (nomInput.offsetTop + nomInput.offsetHeight) + 'px';
|
||||
suggestionsDiv.style.left = nomInput.offsetLeft + 'px';
|
||||
suggestionsDiv.style.width = nomInput.offsetWidth + 'px';
|
||||
suggestionsDiv.style.zIndex = '1060';
|
||||
}
|
||||
|
||||
suggestionsDiv.style.display = 'block';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user