fix(editor): should update icon status when formatting the entire block text (#10508)
Closes: [BS-2718](https://linear.app/affine-design/issue/BS-2718/当处于-block-selection-状态且对整段进行-formatting-时,应该更新对应图标状态)
This commit is contained in:
@@ -257,6 +257,19 @@ export class AffineToolbarWidget extends WidgetComponent {
|
||||
})
|
||||
);
|
||||
|
||||
disposables.add(
|
||||
std.store.slots.blockUpdated.on(record => {
|
||||
if (
|
||||
flags.isBlock() &&
|
||||
record.type === 'update' &&
|
||||
record.props.key === 'text'
|
||||
) {
|
||||
flags.refresh(Flag.Block);
|
||||
return;
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
// Handles `drag and drop`
|
||||
const dragStart = () => flags.toggle(Flag.Hiding, true);
|
||||
const dragEnd = () => flags.toggle(Flag.Hiding, false);
|
||||
|
||||
Reference in New Issue
Block a user