Skip to content

Commit

Permalink
use innerHeight when outerHeight is 0 in gridpicker (#10276)
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll authored Nov 19, 2024
1 parent a9c76fe commit 0ef98af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pxtblocks/fields/field_gridpicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0ef98af

Please sign in to comment.