From cac34390c7cd2fea27ea95f5a473eae4e1f77c3c Mon Sep 17 00:00:00 2001 From: jimlee Date: Thu, 30 Mar 2023 14:19:33 +0800 Subject: [PATCH] =?UTF-8?q?:ok:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=9B=BE=E7=89=87=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + target/classes/static/index.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1b938a6..f80b818 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ hs_err_pid* replay_pid* +.idea \ No newline at end of file diff --git a/target/classes/static/index.html b/target/classes/static/index.html index d36429a..a606702 100644 --- a/target/classes/static/index.html +++ b/target/classes/static/index.html @@ -240,6 +240,9 @@ } function saveValue() { + if (textarea.innerHTML === "") { + return + } let href = "" for (element of textarea.childNodes) { if (href === "" && element.href !== undefined && element.href !== "") { @@ -251,7 +254,7 @@ if (href !== "") { nowValue = href; } else { - nowValue = textarea.innerText + nowValue = textarea.innerText === "" ? textarea.innerHTML : textarea.innerText } if (lastValue !== nowValue && lastUpdate != null && Date.now() - lastUpdate > 3000) { lastValue = nowValue