Skip to content

Commit

Permalink
fix: prevent context menu from opening in non-normal modes
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Jan 16, 2025
1 parent 956c311 commit 474a27e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/components/DefaultPreviewerRender.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as renderer from '@fe/services/renderer'
import { getContextMenuItems, getRenderIframe, scrollTopTo } from '@fe/services/view'
import { getSetting } from '@fe/services/setting'
import { useContextMenu } from '@fe/support/ui/context-menu'
import { DOM_ATTR_NAME } from '@fe/support/args'
import { DOM_ATTR_NAME, MODE } from '@fe/support/args'
import { getLogger, sleep } from '@fe/utils'
import { t } from '@fe/services/i18n'
import store from '@fe/support/store'
Expand Down Expand Up @@ -134,6 +134,8 @@ function handleError (e: Event) {
}
function handleContextMenu (e: MouseEvent) {
if (MODE !== 'normal') return
const contextMenuItems = getContextMenuItems(e)
if (contextMenuItems.length > 0) {
e.stopPropagation()
Expand Down

0 comments on commit 474a27e

Please sign in to comment.