mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 11:48:00 +01:00
fix jumping to option tags
This commit is contained in:
@@ -898,7 +898,7 @@ const liberator = (function () //{{{
|
|||||||
liberator.open("chrome://liberator/locale/" + file, where);
|
liberator.open("chrome://liberator/locale/" + file, where);
|
||||||
// TODO: it would be better to wait for pageLoad
|
// TODO: it would be better to wait for pageLoad
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
let elem = buffer.evaluateXPath("//*[@class='tag' and text()='" + tag + "']").snapshotItem(0);
|
let elem = buffer.evaluateXPath('//*[@class="tag" and text()="' + tag + '"]').snapshotItem(0);
|
||||||
if (elem)
|
if (elem)
|
||||||
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user