From 9de657d4441c44ac22290f2571389669def9e1cf Mon Sep 17 00:00:00 2001 From: DaveZMB Date: Thu, 27 Jan 2022 11:14:13 -0500 Subject: [PATCH] Updating hex text input to work with or without a hashtag --- src/components/Verte.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Verte.vue b/src/components/Verte.vue index 558e332..53da24e 100644 --- a/src/components/Verte.vue +++ b/src/components/Verte.vue @@ -353,6 +353,10 @@ export default { inputChanged (event, value) { const el = event.target; if (this.currentModel === 'hex') { + if (typeof el.value !== 'object' && el.value.indexOf('#') !== 0) { + el.value = '#' + el.value; + } + this.selectColor(el.value); return; }