From ad66330dcf404caf5f71cf305f6f0e91325cea73 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Thu, 8 Jul 2021 10:44:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-54834=20=20=20=20=E6=8B=96=E5=8A=A8?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=AF=BC=E8=87=B4=E6=B2=A1=E6=9C=89=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E6=A0=87=E5=BF=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ipasswordfield/UIPasswordFieldWithFixedLength.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java b/designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java index c1cb98ca3d..02ed99830a 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java +++ b/designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java @@ -68,7 +68,13 @@ public class UIPasswordFieldWithFixedLength extends UIPassWordField { this.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - UIPasswordFieldWithFixedLength.this.clearPassword = true; + UIPasswordFieldWithFixedLength.this.clearPassword = true; + } + + @Override + public void mousePressed(MouseEvent e) { + // 防止拖动进入 + UIPasswordFieldWithFixedLength.this.clearPassword = true; } }); this.addKeyListener(new KeyAdapter() {