Skip to content

Commit f890d42

Browse files
fix: 🐛 incompatibility between Promise.resolve and angular change detection mechanism (#1647)
* fix: 🐛 incompatibility between Promise.resolve and angular change detection mechanism(#1524) * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 89c2faf commit f890d42

File tree

1 file changed

+1
-1
lines changed
  • packages/components/src/list-item-block

1 file changed

+1
-1
lines changed

Diff for: packages/components/src/list-item-block/view.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const listItemBlockView = $view(
4141
dom.onMount = () => {
4242
const { anchor, head } = view.state.selection
4343
if (view.hasFocus()) {
44-
Promise.resolve().then(() => {
44+
setTimeout(() => {
4545
const anchorPos = view.state.doc.resolve(anchor)
4646
const headPos = view.state.doc.resolve(head)
4747
view.dispatch(

0 commit comments

Comments
 (0)