From a7f1235fd18905f6b44a3ca1e8c1b4521d8be62d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 28 Jun 2023 13:08:59 -0400 Subject: [PATCH] Fix middle-mouse autoscroll in reader --- app/scripts/fetch_xulrunner | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner index 90ecd8af02..330227bdde 100755 --- a/app/scripts/fetch_xulrunner +++ b/app/scripts/fetch_xulrunner @@ -296,6 +296,17 @@ function modify_omni { # Use native checkbox instead of Firefox-themed version in prompt dialogs replace_line ' CE appends its autoscroll to document.documentElement, which doesn't work in zoteroPane.xhtml + # (in Firefox browser.xhtml, document.documentElement is , which can contain s; in zoteroPane.xhtml, it's + # , which can't) + # Fix by appending it to a instead + replace_line 'document.documentElement.appendChild\(this._autoScrollPopup\);' 'let popupset = document.querySelector("popupset"); + if (!popupset) { + popupset = document.createXULElement("popupset"); + document.documentElement.appendChild(popupset); + } + popupset.appendChild(this._autoScrollPopup);' chrome/toolkit/content/global/elements/browser-custom-element.js + zip -qr9XD omni.ja * mv omni.ja .. cd ..