File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ export class BlockPanel {
228228 this . targetElement = undefined ;
229229 // 移除弹出上使用右键菜单
230230 const menuLevel = parseInt ( window . siyuan . menus . menu . element . dataset . from ) ;
231- if ( menuLevel && menuLevel >= level && window . siyuan . menus . menu . element . dataset . from . includes ( "popover" ) ) {
231+ if ( menuLevel && menuLevel >= level && window . siyuan . menus . menu . element . dataset . from ? .includes ( "popover" ) ) {
232232 // https://github.com/siyuan-note/siyuan/issues/9854 右键菜单不是从浮窗中弹出的则不进行移除
233233 window . siyuan . menus . menu . remove ( ) ;
234234 }
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export abstract class Constants {
244244 public static readonly MENU_DOC_TREE_MORE = "docTreeMore" ; // 侧栏文档树右键菜单
245245 public static readonly MENU_FROM_DOC_TREE_MORE_NOTEBOOK = "tree-notebook" ; // 侧栏文档树右键菜单,单个笔记本
246246 public static readonly MENU_FROM_DOC_TREE_MORE_DOC = "tree-doc" ; // 侧栏文档树右键菜单,单个文档
247- public static readonly MENU_FROM_DOC_TREE_MORE_DOCS = "tree-docs " ; // 侧栏文档树右键菜单,多个文档
247+ public static readonly MENU_FROM_DOC_TREE_MORE_ITEMS = "tree-items " ; // 侧栏文档树右键菜单,多个文档或笔记本
248248 public static readonly MENU_TAG = "tagMenu" ; // 侧栏标签菜单
249249 public static readonly MENU_BOOKMARK = "bookmarkMenu" ; // 侧栏书签菜单
250250 public static readonly MENU_OUTLINE_CONTEXT = "outline-context" ; // 大纲标题右键菜单
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import {openByMobile} from "../protyle/util/compatibility";
3232import { addFilesToDatabase } from "../protyle/render/av/addToDatabase" ;
3333
3434const initMultiMenu = ( selectItemElements : NodeListOf < Element > , app : App ) => {
35- window . siyuan . menus . menu . element . setAttribute ( "data-from" , Constants . MENU_FROM_DOC_TREE_MORE_DOCS ) ;
35+ window . siyuan . menus . menu . element . setAttribute ( "data-from" , Constants . MENU_FROM_DOC_TREE_MORE_ITEMS ) ;
3636 const fileItemElement = Array . from ( selectItemElements ) . find ( item => {
3737 if ( item . getAttribute ( "data-type" ) === "navigation-file" ) {
3838 return true ;
@@ -204,9 +204,8 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
204204 const selectItemElements = fileElement . querySelectorAll ( ".b3-list-item--focus" ) ;
205205 if ( selectItemElements . length > 1 ) {
206206 return initMultiMenu ( selectItemElements , app ) ;
207- } else {
208- window . siyuan . menus . menu . element . setAttribute ( "data-from" , Constants . MENU_FROM_DOC_TREE_MORE_NOTEBOOK ) ;
209207 }
208+ window . siyuan . menus . menu . element . setAttribute ( "data-from" , Constants . MENU_FROM_DOC_TREE_MORE_NOTEBOOK ) ;
210209 const notebookId = liElement . parentElement . getAttribute ( "data-url" ) ;
211210 const name = getNotebookName ( notebookId ) ;
212211 if ( ! window . siyuan . config . readonly ) {
You can’t perform that action at this time.
0 commit comments