Skip to content

Commit

Permalink
Fix readonly mode (#9894)
Browse files Browse the repository at this point in the history
Readonly mode wasn't being honored in the blockly workspace because we were resetting the flag based on whether or not we were in debug mode. With this change, we will also account for the original readonly mode in that check.
  • Loading branch information
thsparks authored Feb 29, 2024
1 parent fc50d56 commit c2aeb66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/src/blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
}
});

this.editor.options.readOnly = debugging;
this.editor.options.readOnly = debugging || pxt.shell.isReadOnly();
}

protected enableBreakpoint(block: Blockly.Block, enabled: boolean) {
Expand Down Expand Up @@ -1954,4 +1954,4 @@ function fixHighlight(block: Blockly.BlockSvg) {
if (connectedTo) {
fixHighlight(connectedTo);
}
}
}

0 comments on commit c2aeb66

Please sign in to comment.