diff --git a/packages/client/src/thirtypart/kityminder/kity-core/core/theme.js b/packages/client/src/thirtypart/kityminder/kity-core/core/theme.js index 459493d3..2cad95a8 100644 --- a/packages/client/src/thirtypart/kityminder/kity-core/core/theme.js +++ b/packages/client/src/thirtypart/kityminder/kity-core/core/theme.js @@ -61,7 +61,7 @@ define(function (require, exports, module) { }, setTheme: function (name) { - if (name && !_themes[name]) throw new Error('Theme ' + name + ' not exists!'); + if (name && !_themes[name]) return; var lastTheme = this._theme; this._theme = name || null; var container = this.getRenderTarget(); diff --git a/packages/client/src/tiptap/core/bubble-menu/bubble-menu-plugin.tsx b/packages/client/src/tiptap/core/bubble-menu/bubble-menu-plugin.tsx index 58c8833b..71c7027a 100644 --- a/packages/client/src/tiptap/core/bubble-menu/bubble-menu-plugin.tsx +++ b/packages/client/src/tiptap/core/bubble-menu/bubble-menu-plugin.tsx @@ -1,7 +1,7 @@ import { Editor, isNodeSelection, isTextSelection, posToDOMRect } from '@tiptap/core'; import { EditorState, Plugin, PluginKey } from 'prosemirror-state'; import { EditorView } from 'prosemirror-view'; -import tippy, { Instance, Props } from 'tippy.js'; +import tippy, { Instance, Props, sticky } from 'tippy.js'; export interface BubbleMenuPluginProps { pluginKey: PluginKey | string; @@ -144,6 +144,7 @@ export class BubbleMenuView { trigger: 'manual', placement: 'top', hideOnClick: 'toggle', + plugins: [sticky], ...Object.assign( { zIndex: 999,