mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
parent
5f4133e8a3
commit
77a1f62979
1 changed files with 13 additions and 5 deletions
|
|
@ -439,11 +439,19 @@ kpxcFields.isTopElement = function(elem, rect) {
|
|||
}
|
||||
|
||||
// Check for popup overlays
|
||||
const overlays = document.querySelectorAll(':popover-open');
|
||||
for (const overlay of overlays) {
|
||||
const overlayRect = overlay?.getBoundingClientRect();
|
||||
if (overlayRect && elementsOverlap(rect, overlayRect)) {
|
||||
return false;
|
||||
try {
|
||||
// :popover-open selector is supported only with Firefox >= 125 and Chrome >= 114
|
||||
const overlays = document.querySelectorAll(':popover-open, [popover]');
|
||||
for (const overlay of overlays) {
|
||||
const overlayRect = overlay?.getBoundingClientRect();
|
||||
if (overlayRect && elementsOverlap(rect, overlayRect)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// Ignore SyntaxError (e.g., unsupported selector)
|
||||
if (!(e instanceof SyntaxError)) {
|
||||
logError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue