mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
fix: bring comments and bubbles to the front on click (#8451)
* Bring comment to the block layer when clicked * Bring bubbles to front when clicked
This commit is contained in:
committed by
GitHub
parent
612b8c89dc
commit
f020b54fd0
@@ -212,9 +212,10 @@ export abstract class Bubble implements IBubble, ISelectable {
|
||||
this.background.setAttribute('fill', colour);
|
||||
}
|
||||
|
||||
/** Passes the pointer event off to the gesture system. */
|
||||
/** Brings the bubble to the front and passes the pointer event off to the gesture system. */
|
||||
private onMouseDown(e: PointerEvent) {
|
||||
this.workspace.getGesture(e)?.handleBubbleStart(e, this);
|
||||
this.bringToFront();
|
||||
common.setSelected(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
import {IContextMenu} from '../interfaces/i_contextmenu.js';
|
||||
import * as contextMenu from '../contextmenu.js';
|
||||
import {ContextMenuRegistry} from '../contextmenu_registry.js';
|
||||
import * as layers from '../layers.js';
|
||||
|
||||
export class RenderedWorkspaceComment
|
||||
extends WorkspaceComment
|
||||
@@ -208,6 +209,7 @@ export class RenderedWorkspaceComment
|
||||
const gesture = this.workspace.getGesture(e);
|
||||
if (gesture) {
|
||||
gesture.handleCommentStart(e, this);
|
||||
this.workspace.getLayerManager()?.append(this, layers.BLOCK);
|
||||
common.setSelected(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user