diff --git a/pxtblocks/fields/field_gridpicker.ts b/pxtblocks/fields/field_gridpicker.ts index 7f150669850..7b429cb59d1 100644 --- a/pxtblocks/fields/field_gridpicker.ts +++ b/pxtblocks/fields/field_gridpicker.ts @@ -367,11 +367,11 @@ export class FieldGridPicker extends Blockly.FieldDropdown implements FieldCusto width: paddingContainer.offsetWidth, height: paddingContainer.offsetHeight }; - const windowHeight = window.outerHeight; + const windowHeight = window.outerHeight || window.innerHeight; // Set width if (this.width_) { - const windowWidth = window.outerWidth; + const windowWidth = window.outerWidth || window.innerWidth; if (this.width_ > windowWidth) { this.width_ = windowWidth; }