google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.51k stars 3.72k forks source link

fix: Fix bug that prevented dismissing the widgetdiv in a mutator workspace. #8600

Closed gonfunko closed 1 month ago

gonfunko commented 1 month ago

The basics

The details

Resolves

Fixes #8599

Proposed Changes

This PR updates WidgetDiv.hideIfOwnerIsInWorkspace() to hide the widget div if its owner is an indirect child of the given workspace, e.g. the given workspace is the root workspace but the widget div is owned by a child of a mutator workspace. AFAIK workspaces are only ever nested one level deep in practice, but I'm not aware of anything that enforces that, so it attempts to walk up an arbitrarily deep workspace hierarchy.