Fix profiler pop-up extending beyond the window, impossible to scroll (#492)

Fix profiler pop-up extending beyond the window, impossible to scroll (#492)

diff --git a/lib/html/includes.js b/lib/html/includes.js
index d0608d2..c306574 100644
--- a/lib/html/includes.js
+++ b/lib/html/includes.js
@@ -401,7 +401,7 @@ var _MiniProfiler = (function() {
     var px = button.offsetTop - 1,
       // position next to the button we clicked
       windowHeight = window.innerHeight,
-      maxHeight = windowHeight - 40; // make sure the popup doesn't extend below the fold
+      maxHeight = windowHeight - px - 40; // make sure the popup doesn't extend below the fold
 
     popup.style[options.renderVerticalPosition] = "".concat(px, "px");
     popup.style.maxHeight = "".concat(maxHeight, "px");

GitHub sha: aef9b230

This commit appears in #492 which was merged by SamSaffron.