diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 86bcfeea..7d74278f 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -201,27 +201,10 @@ export default { evt.stopPropagation(); evt.preventDefault(); - const input = document.getElementById(evt.srcElement.id); - const originalValue = input.value; - const startPosition = input.selectionStart; - const endPosition = input.selectionEnd; - const selectionLength = endPosition - startPosition; + const data = evt.type === 'paste' ? (evt.clipboardData || window.clipboardData) : evt.dataTransfer; + const value = data.getData('Text')?.trim(); - let data = null; - if (evt.type === 'paste') { - data = evt.clipboardData || window.clipboardData; - } else { - data = evt.dataTransfer; - } - - const textValue = data.getData('Text'); - - // Insert the pasted/dropped string at the index position - const arrOriginalString = originalValue.split(''); - arrOriginalString.splice(startPosition, selectionLength, textValue); - const blendedString = arrOriginalString.join(''); - - this.$emit('update:modelValue', blendedString); + this.$emit('update:modelValue', this.modelValue + value); }, clickedSearch() { if (this.meta.valid) { diff --git a/src/layouts/tpa-search/tpa-search.vue b/src/layouts/tpa-search/tpa-search.vue index 41d80dc6..be446bde 100644 --- a/src/layouts/tpa-search/tpa-search.vue +++ b/src/layouts/tpa-search/tpa-search.vue @@ -31,83 +31,83 @@ :includeSearchIcon="true" :displayQuestionText="false" isRequired + :isDisabled="reloadingProviders" :validationRules="rules.zipCode" @clickEvent="searchClick" /> -