mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
chore: fix comments being resizable when readonly (#8043)
This commit is contained in:
@@ -495,6 +495,8 @@ export class CommentView implements IRenderedElement {
|
||||
* comment.
|
||||
*/
|
||||
private onResizePointerDown(e: PointerEvent) {
|
||||
if (!this.isEditable()) return;
|
||||
|
||||
this.bringToFront();
|
||||
if (browserEvents.isRightButton(e)) {
|
||||
e.stopPropagation();
|
||||
@@ -795,6 +797,9 @@ css.register(`
|
||||
height: 12px;
|
||||
cursor: se-resize;
|
||||
}
|
||||
.blocklyReadonly.blocklyComment .blocklyResizeHandle {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.blocklyCommentTopbarBackground {
|
||||
fill: var(--commentBorderColour);
|
||||
|
||||
@@ -251,7 +251,8 @@
|
||||
if (sessionStorage) {
|
||||
sessionStorage.setItem('logFlyoutEvents', Number(state));
|
||||
}
|
||||
var flyoutWorkspace = workspace.getFlyout().getWorkspace();
|
||||
var flyoutWorkspace = workspace.getFlyout()?.getWorkspace();
|
||||
if (!flyoutWorkspace) return;
|
||||
if (state) {
|
||||
flyoutWorkspace.addChangeListener(logger);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user