diff --git a/api/js/etemplate/et2_widget_historylog.ts b/api/js/etemplate/et2_widget_historylog.ts
index f57e86c514..8a4d85b05e 100644
--- a/api/js/etemplate/et2_widget_historylog.ts
+++ b/api/js/etemplate/et2_widget_historylog.ts
@@ -733,13 +733,14 @@ export class et2_historylog extends et2_valueWidget implements et2_IDataProvider
 		let tab = this.get_tab_info();
 		if(this.dataview)
 		{
+			const style = getComputedStyle(tab.contentDiv);
 			// -# to avoid scrollbars
 			this.dataview.resize(
 				Math.min(
 					window.innerWidth - 15,
-					parseInt(getComputedStyle(tab.contentDiv).width)
+					parseInt(style.width)
 				) - 5,
-				parseInt(getComputedStyle(tab.contentDiv).height) - 5
+				parseInt(style.height) - parseInt(style.paddingTop) - parseInt(style.paddingBottom) - 5
 			);
 		}
 	}