This commit is contained in:
Timothy Jaeryang Baek
2025-07-03 21:28:09 +04:00
parent d2485bbf09
commit 75096c24ac
3 changed files with 21 additions and 17 deletions

View File

@@ -123,6 +123,11 @@
if (dispatch) {
const tr = state.tr.setSelection(TextSelection.create(doc, template.from, template.to));
dispatch(tr);
// Scroll to the selected template
dispatch(
tr.scrollIntoView().setMeta('preventScroll', true) // Prevent default scrolling behavior
);
}
return true;
}