Skip to content

Commit

Permalink
fix: gap cursor causing command menu to malfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
LIlGG committed Jun 20, 2024
1 parent a90dbcb commit e48b24e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ui/packages/editor/src/extensions/commands-menu/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import tippy from "tippy.js";
export default Extension.create({
name: "commands-menu",

priority: 8000,

addProseMirrorPlugins() {
const commandMenuItems = getToolbarItemsFromExtensions(
this.editor as Editor
Expand Down
4 changes: 3 additions & 1 deletion ui/packages/editor/src/extensions/gap-cursor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ declare module "@tiptap/core" {
* - Tab key
*/
const GapCursor = Extension.create({
priority: 9999,
name: "gapCursor",

priority: 7000,

addProseMirrorPlugins() {
return [
new Plugin({
Expand Down Expand Up @@ -259,6 +260,7 @@ export function arrow(axis: "vert" | "horiz", dir: number): Command {
const dirStr =
axis == "vert" ? (dir > 0 ? "down" : "up") : dir > 0 ? "right" : "left";
return (state, dispatch, view) => {
console.log("arrow", axis, dir, dirStr, state, dispatch, view);
const tr = arrowGapCursor(dir, dirStr, state, view);
if (tr && dispatch) {
dispatch(tr);
Expand Down

0 comments on commit e48b24e

Please sign in to comment.