diff --git a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts index 4dad8d5e4..f2527d1c6 100644 --- a/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts +++ b/packages/tldraw/src/lib/tools/SelectTool/childStates/PointingShape.ts @@ -5,6 +5,7 @@ import { TLArrowShape, TLEventHandlers, TLGeoShape, + TLNoteShape, TLPointerEventInfo, TLShape, } from '@tldraw/editor' @@ -28,6 +29,13 @@ export class PointingShape extends StateNode { this.hitShape = info.shape const outermostSelectingShape = this.editor.getOutermostSelectableShape(info.shape) + // Bring sticky notes to front on pointer down; + // consider changing the logic to "move to front of any overlapping shapes" + // rather than move to front of all shapes in the page / parent + if (this.editor.isShapeOfType(info.shape, 'note')) { + this.editor.bringToFront([info.shape.id]) + } + if ( // If the shape has an onClick handler this.editor.getShapeUtil(info.shape).onClick ||