Skip to content

Commit f7dd803

Browse files
author
AENERV7
committed
bump: v0.2.5 - disable context menu outside input fields
1 parent d785124 commit f7dd803

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

dist/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,14 @@ <h2 data-i18n="lang_title" style="margin-top:1.5rem;"></h2>
380380

381381
const { invoke } = window.__TAURI__.core;
382382

383+
// ── 禁用非输入区域右键菜单 ──
384+
document.addEventListener("contextmenu", (e) => {
385+
const tag = e.target.tagName;
386+
if (tag !== "INPUT" && tag !== "TEXTAREA") {
387+
e.preventDefault();
388+
}
389+
});
390+
383391
// ── 外部链接 ──
384392
document.addEventListener("click", (e) => {
385393
const a = e.target.closest("a[target='_blank']");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yauz",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"private": true,
55
"scripts": {
66
"tauri": "tauri",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "yauz"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
edition = "2021"
55

66
[lib]

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"productName": "YAUZ",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"identifier": "com.yauz.dev",
55
"build": {
66
"frontendDist": "../dist"

0 commit comments

Comments
 (0)