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