Commit 0d9e104e authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

Extensions WebUI: replace hardcoded value causing body scroll with value from element

Bug: 850877
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Idc3c4520ab26400fbbca3490e038b1d25f4a8727
Reviewed-on: https://chromium-review.googlesource.com/1093262Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566934}
parent 03fef017
......@@ -58,9 +58,9 @@ cr.define('extensions', function() {
* @private
*/
updateDialogSize_: function(width, height) {
const HEADER_HEIGHT = 64;
const headerHeight = this.$.body.offsetTop;
const maxHeight = Math.min(0.9 * window.innerHeight, MAX_HEIGHT);
const effectiveHeight = Math.min(maxHeight, HEADER_HEIGHT + height);
const effectiveHeight = Math.min(maxHeight, headerHeight + height);
const effectiveWidth = Math.max(MIN_WIDTH, width);
// Get a reference to the inner native <dialog>.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment