Skip to content

Commit

Permalink
feat: 兼容笔记本触摸板操作
Browse files Browse the repository at this point in the history
  • Loading branch information
better-tcy committed Oct 25, 2022
1 parent e36362a commit 1f1c990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dom-to-code/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function initDomToCode(): void {
})

document.addEventListener('mousedown', (e) => {
if (e.button === 1 && (keyCode === 'Control' || keyCode === 'Meta')) {
if ((e.button === 1 || e.button === 2) && (keyCode === 'Control' || keyCode === 'Meta')) {
e.stopImmediatePropagation()
e.preventDefault()
e.stopPropagation()
Expand Down

0 comments on commit 1f1c990

Please sign in to comment.