Replace jQuery in webview.py

This commit is contained in:
Henrik Giesel 2021-04-13 21:32:53 +02:00
parent 3e1b42bb62
commit 280f78535b

View File

@ -599,7 +599,7 @@ body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; {font} }}
self._bridge_context = None self._bridge_context = None
def adjustHeightToFit(self) -> 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: def _onHeight(self, qvar: Optional[int]) -> None:
from aqt import mw from aqt import mw