Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pxtblocks/builtins/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function initVariables() {
* @this Blockly.Block
*/
customContextMenu: function (this: Blockly.BlockSvg, options: any[]) {
if (!(this.workspace?.options?.readOnly)) {
if (!(this.workspace?.options?.readOnly) && !this.isInFlyout) {
let option: any = {
enabled: this.workspace.remainingCapacity() > 0
};
Expand Down
3 changes: 2 additions & 1 deletion pxtblocks/fields/field_ledmatrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ export class FieldLedMatrix extends FieldMatrix implements FieldCustom {
}

setValue(newValue: string | number, restoreState = true) {
super.setValue(String(newValue));
const shouldFireChangeEvent = newValue !== this.value_;
super.setValue(String(newValue), shouldFireChangeEvent);
if (this.matrixSvg) {
if (restoreState) this.restoreStateFromString();

Expand Down
8 changes: 5 additions & 3 deletions webapp/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3742,10 +3742,10 @@ export class ProjectView
if (enabled) {
document.addEventListener('keydown', this.closeOnEscape);
simulator.driver.focus();
this.closeFlyout();
} else {
document.removeEventListener('keydown', this.closeOnEscape);
}
this.closeFlyout();
this.setState({ fullscreen: enabled });
}

Expand Down Expand Up @@ -5332,8 +5332,10 @@ export class ProjectView
///////////////////////////////////////////////////////////

toggleAreaMenu() {
// Close the simulator if needed.
if (this.state.fullscreen) {
// Restore the simulator if needed. If the area menu is open, allow the simulator to
// stay fullscreened. The desired behaviour is that the mini sim can be fullscreened
// through the area menu, otherwise it has been restored already.
if (this.state.fullscreen && !this.state.areaMenuOpen) {
this.setSimulatorFullScreen(false);
}

Expand Down