From 0465a2a668465b5811b725e864b229757d4aa67c Mon Sep 17 00:00:00 2001 From: navedqb <109583873+navedqb@users.noreply.github.com> Date: Mon, 13 May 2024 22:14:21 +0530 Subject: [PATCH 1/2] fix: disable paste function on readonly mode --- components/lib/inputnumber/InputNumber.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index c041b4e7d2..41fd50f20d 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -549,6 +549,10 @@ export default { } }, onPaste(event) { + if (this.readonly || this.disabled) { + return + } + event.preventDefault(); let data = (event.clipboardData || window['clipboardData']).getData('Text'); From 7e200f035cbaef268ad0b345b1a8045b9b778e10 Mon Sep 17 00:00:00 2001 From: navedqb <109583873+navedqb@users.noreply.github.com> Date: Wed, 15 May 2024 13:50:51 +0530 Subject: [PATCH 2/2] added missing semicolon --- components/lib/inputnumber/InputNumber.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index 41fd50f20d..a4db32f9c7 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -550,7 +550,7 @@ export default { }, onPaste(event) { if (this.readonly || this.disabled) { - return + return; } event.preventDefault();