Removing a component (directly or via replaceWith) left it in the
editor's Selected collection, since only the core:component-delete
command deselected explicitly. The stale entry breaks anything
iterating the selection and, with UndoManager's trackSelection,
lets undo restore a selection pointing at removed components.
Deselect in Components.removeChildren so every non-temporary removal
path is covered. Temporary and undo-driven removals are unaffected.
The stale-target cache in DropLocationDeterminer#getValidParent compared
the current drop-bounds check (container-relative coords) against one
computed from the last mouse event's clientX/clientY (viewport coords),
making the comparison meaningless. On slow drags, where the hovered node
and index stay the same between move samples, the cached target was
returned even after the pointer entered an edge band that should
escalate the target to the parent.
Store the drop-bounds result of each move in lastMoveData and compare
against it, keeping the whole check in a single coordinate space.
Introduced in #6542 (0.22.10).
* Add skipFromStorage support to page and frames
* Add custom wrapper support to frames and refComponent
* Fix Component TS
* Ensure frame reference in components
* Add SelectComponentCommandOptions
* Update runDefault/stopDefault
* Fix component add event with page cloning
* Up TS
Component-level data-variable props moved into the dataResolver
object in #6495, but the docs still showed the old flat shape,
which now fails silently (no render, no updates on record change).
Style and trait data variables keep the flat shape, so those
examples are left untouched.
fix(parser): don't drop @container/@layer at-rules on CSS parse
The browser CSS parser only recognised nestable at-rules (@container,
@layer, ...) when the CSSOM reported a falsy rule `type`. That happened
to work in Chrome, where the legacy `CSSRule.type` is `0` for newer
at-rules, but engines that expose a real numeric type (jsdom reports
`17` for `CSSContainerRule`) fell through every branch and the whole
rule — selectors, styles and condition — was silently discarded.
Detect nestable at-rules via `getNestableAtRule` regardless of the
numeric `type`. `getNestableAtRule` already matches only when the rule's
`cssText` starts with the exact `@<name>`, so normal style/keyframe
rules are unaffected. The parsed condition keeps the container name and
its query separated by a space, so the exported CSS is valid again
(e.g. `@container somename (min-width: 300px){...}`).
Fixes#5969
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Browsers don't apply the input `accept` attribute to dropped files, so
videos dropped on an image upload zone were uploaded and selectable.
Filter dropped files against `accept` in FileUploader.uploadFile().
Closes#6032
* Initial setup for custom code parser
* Update ParserHtml
* Move methods
* Up
* Move utils
* Fix tests
* Up sanitize
* Up domToParsedNode
* Up fragment node
* Remove node cloning
* Convert ParserHtml to class
* Convert ParserCss to a class
* Update Custom CSS/HTML docs
* Always use isParsedNode if available
* Update API
* Update docs for isParserNode
* Add support for nested CSS rules
* Update undo test
* Cleanup resolutions and TS config
* Update jest
* Normalize tests for the latest jsdom version
* Parse nested CSS rules
* Add hidden test for @page at-rule
* Fix VuePress build
* Up CI nodejs
* Cache list counter
* Skip model resolver when possible
* Clean up Component.getView
* Cleanup SelectComponent
* Update Component getView
* Check in CommandAbstract
* Start data source import policy implementation
* Fix TS
* Update applyImportPolicy
* Up TS naming
* Up test file
* Improve applyImportPolicy
* Add more use cases to data binding import policy tests
* Add support per-call dataBindingImportPolicy
* Up JSDoc
* Fix tests
* Format
* Allow skipping nodes during HTML parsing
* Type canvas events
* Type commands event callbacks
* Type device event callbacks
* Add callback events to i18n
* Add callbacks types to keymaps
* Add callback types to modal
* Add callback types to layers
* Add callback types for pages
* Add callback types to parser
* Add callback type to RTE
* Add callback types to selectors
* Add callback types for storage
* Add callback types to StyleManager
* Add callback types to traits
* Add callback events to Components
* Add callbacks types to editor
* Up types
* Fix API docs generation
* Format