mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Check document.dir to determine the position of the icon.
This commit is contained in:
parent
a6d13e831a
commit
4910dc7973
1 changed files with 7 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ class Icon {
|
|||
if (!this.icon) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (locked) {
|
||||
this.icon.style.filter = 'saturate(0%)';
|
||||
} else {
|
||||
|
|
@ -85,7 +85,12 @@ kpxcUI.setIconPosition = function(icon, field) {
|
|||
const size = Number(icon.getAttribute('size'));
|
||||
|
||||
icon.style.top = Pixels((rect.top + document.scrollingElement.scrollTop) + offset + 1);
|
||||
icon.style.left = Pixels((rect.left + document.scrollingElement.scrollLeft) + field.offsetWidth - size - offset);
|
||||
if (document.dir == 'rtl') {
|
||||
icon.style.left = Pixels((rect.left + document.scrollingElement.scrollLeft) + offset);
|
||||
}
|
||||
else {
|
||||
icon.style.left = Pixels((rect.left + document.scrollingElement.scrollLeft) + field.offsetWidth - size - offset);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue