MarkerManager.setMarkerSvg
fails if the cursor exists and has moved from the top level
#8758
Open
1 task done
Labels
issue: bug
Describes why the code or behaviour is wrong
Check for duplicates
Description
MarkerManager.setMarkerSvg
is implemented as:If
this.cursorSvg
and the block canvas both exist, there's a call toblockCanvas.insertBefore(markerSvg, this.cursorSvg)
.If the marker is created immediately after the cursor, this call works because the cursor SVG is a direct child of the block canvas. But if the cursor has been moved around or reparented (e.g. by calling
MarkerSvg.setParent_
, then the operation fails with:Reproduction steps
I found this by updating the keyboard-experimentation code to dynamically register and unregister the marker instead of creating it once and leaving it around (attempting to address google/blockly-keyboard-experimentation#181).
Stack trace
Screenshots
No response
Browsers
No response
The text was updated successfully, but these errors were encountered: