v2.27.0-rc.5
Pre-release
Pre-release
Improvement— Breaking Change — Batching added to theonChangecallback. Now the second argument can contain an array of CustomEvents as well as a single one. If several changes will be made in short period of time, they will be batched under the singleonChangecallImprovement— Pressing "Enter" at the end of a Block won't lead to redundantblock-changedevent triggering. Onlyblock-addedevent will be dispatched.Fix— TheonChangewon't be triggered with Block Tunes opening and closing.Refactoring—EventDispatchertypes improved. Now we can passEventsMapvia generic to specify a map of event names and their payloads that can be used in a particular EventDispatcher instance.Refactoring— All events in common editor Event Bus now have own type declarations.Refactoring— Now Blocks don't have own Mutation Observer. The single observer attached to the editor's blocks wrapper element.ModificationsObserverlistens blocks wrapper changes, then emits an event into the common editor Event Bus. Each Block subscribes to such events and handle those who related to a particular Block.Improvement— Block's mutation handler now will be called on every block change (including background changes). Previously, it have worked only if a particular Block have been focused.Refactoring— Debounce have been removed from Block's mutation handler. The batching inModificationObserverused instead.Improvement— Number of caret saving method calls optimized for Block Tunes opening/closing.New— Types for Block mutation events added.Fix- Several bugs caused by random browser extensions. Now we are not searching for a block's container in the DOM on saving. Instead, we keep it in memory and update it when the tool changes a container element.