adjust #hotkey-info position for scrollingElement

This commit is contained in:
tophf 2017-12-10 08:09:36 +03:00
parent 0a865318a4
commit 242e3384b2

View File

@ -204,7 +204,8 @@ var hotkeys = (() => {
return; return;
} }
const style = $('#hotkey-info').style; const style = $('#hotkey-info').style;
if (installed.scrollHeight > installed.clientHeight) { if (installed.scrollHeight > installed.clientHeight ||
document.scrollingElement.scrollHeight > document.scrollingElement.innerHeight) {
const entryRight = installed.firstElementChild.getBoundingClientRect().right; const entryRight = installed.firstElementChild.getBoundingClientRect().right;
style.setProperty('right', window.innerWidth - entryRight + 'px', 'important'); style.setProperty('right', window.innerWidth - entryRight + 'px', 'important');
} }