Skip to content

Commit

Permalink
Dont change editor zoom via cmd + mouse wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Mar 5, 2024
1 parent d5931f2 commit f9b16ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resource/lib/vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function isCompose(e) {

function zoomElement(selector, rate = 5) {
window.onmousewheel = document.onmousewheel = e => {
if (!isCompose(e)) return;
if (!e.ctrlKey || e.metaKey) return;
const eles = document.querySelectorAll(selector);
for (const ele of eles) {
const zoom = ele.style.zoom ? parseInt(ele.style.zoom.replace("%", "")) : 100
Expand Down

0 comments on commit f9b16ed

Please sign in to comment.