From 280f78535b1c40460bac2a3737577df40f8dea39 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 13 Apr 2021 21:32:53 +0200 Subject: [PATCH] Replace jQuery in webview.py --- qt/aqt/webview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index 484a76622..475e5b148 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -599,7 +599,7 @@ body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; {font} }} self._bridge_context = None def adjustHeightToFit(self) -> None: - self.evalWithCallback("$(document.body).height()", self._onHeight) + self.evalWithCallback("document.documentElement.offsetHeight", self._onHeight) def _onHeight(self, qvar: Optional[int]) -> None: from aqt import mw