mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Fix form detection from style attribute
This commit is contained in:
parent
71491d9e98
commit
6964513dde
2 changed files with 6 additions and 4 deletions
|
|
@ -1976,7 +1976,7 @@ kpxcObserverHelper.initObserver = async function() {
|
|||
} else if (mut.removedNodes.length > 0) {
|
||||
kpxcObserverHelper.handleObserverRemove(mut.removedNodes[0]);
|
||||
}
|
||||
} else if (mut.type === 'attributes' && mut.attributeName === 'class') {
|
||||
} else if (mut.type === 'attributes' && (mut.attributeName === 'class' || mut.attributeName === 'style')) {
|
||||
// Only accept targets with forms
|
||||
const forms = mut.target.nodeName === 'FORM' ? mut.target : mut.target.getElementsByTagName('form');
|
||||
if (forms.length === 0 && !kpxcSites.exceptionFound(mut.target.classList)) {
|
||||
|
|
|
|||
|
|
@ -125,10 +125,12 @@ kpxcUI.setIconPosition = function(icon, field, rtl = false, segmented = false) {
|
|||
left += size + 10;
|
||||
}
|
||||
|
||||
icon.style.top = Pixels(top + document.scrollingElement.scrollTop + offset + 1);
|
||||
const scrollTop = document.scrollingElement ? document.scrollingElement.scrollTop : 0;
|
||||
const scrollLeft = document.scrollingElement ? document.scrollingElement.scrollLeft : 0;
|
||||
icon.style.top = Pixels(top + scrollTop + offset + 1);
|
||||
icon.style.left = rtl
|
||||
? Pixels((left + document.scrollingElement.scrollLeft) + offset)
|
||||
: Pixels(left + document.scrollingElement.scrollLeft + field.offsetWidth - size - offset);
|
||||
? Pixels((left + scrollLeft) + offset)
|
||||
: Pixels(left + scrollLeft + field.offsetWidth - size - offset);
|
||||
};
|
||||
|
||||
kpxcUI.deleteHiddenIcons = function(iconList, attr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue