diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js index cb57de7e..8b9e49cc 100644 --- a/src/blocks/scratch3_looks.js +++ b/src/blocks/scratch3_looks.js @@ -125,7 +125,11 @@ class Scratch3LooksBlocks { } else { this.runtime.renderer.updateDrawableProperties(bubbleState.drawableId, { position: [ - bubbleState.onSpriteRight ? targetBounds.right : targetBounds.left - bubbleWidth, + bubbleState.onSpriteRight ? ( + Math.min(stageBounds.right - bubbleWidth, targetBounds.right) + ) : ( + Math.max(stageBounds.left, targetBounds.left - bubbleWidth) + ), Math.min(stageBounds.top, targetBounds.top + bubbleHeight) ] });