Merge pull request #2731 from keepassxreboot/fix/label_overlaps

Fix overlap checks with labels
This commit is contained in:
Sami Vänttinen 2025-10-26 11:03:44 +02:00 committed by GitHub
commit 87b949a008
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -479,7 +479,7 @@ kpxcFields.isTopElement = function(elem, rect) {
const topElement = rootNode.elementFromPoint(x, elementRect.top + (elementRect.height / 2));
return element?.labels &&
element.labels[0] === topElement &&
isElementInside(elementRect, topElement.getBoundingClientRect())
elementsOverlap(elementRect, topElement.getBoundingClientRect())
? element
: topElement;
};