question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report][2.3.6] v-text-field outlined border colour incorrect with validation on iOS

See original GitHub issue

Environment

Vuetify Version: 2.3.6 Vue Version: 2.6.11 Browsers: Safari OS: iOS

Steps to reproduce

Exceed the character limit for validation and the outline stays blue Reduce the number characters to be < character limit and outline goes red Pinch zoom in and out and the line flickers from blue to red and back

Expected Behavior

Outline to accurately reflect state of field

Actual Behavior

Outline doesn’t reflect state of field

Reproduction Link

https://codepen.io/andrewcowley/pen/XWXQPLQ

Other comments

Workaround:

 .v-text-field--outlined fieldset {
    border-color: currentColor !important
  }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

2reactions
lacherogwucommented, Oct 24, 2020

I found a workaround using MutationObeserve, that’s a quick fix until Vuetify will fix the issue on their side.

I set in the “mounted” lifecycle hook this function

const form = this.$refs.form.$el

const observer = new MutationObserver((mutationsList) => {
  mutationsList.forEach(({ type, target }) => {
    const fieldset = target.querySelector('fieldset')
    if(!fieldset) return
    fieldset.style = ''

    if(type === 'attributes' && target.classList.contains('v-input--has-state')){
      const activeClass = ['success', 'error'].filter(i => target.classList.contains(`${i}--text`))[0]
      activeClass === 'error' ? fieldset.style = 'border-color: #ff5252 !important;' : fieldset.style = 'border-color: #4caf50 !important;'
    }
  })
})

observer.observe(form, { attributes: true, subtree: true })

And this on the “style” block

.v-application div.v-text-field--outlined {
    color: transparent !important;
}
.v-text-field--outlined.v-input--is-focused fieldset, .v-text-field--outlined.v-input--has-state fieldset {
    border-color: #1976d2 !important;
}

Enjoy!

0reactions
lacherogwucommented, Jul 7, 2021

The workaround also doesn’t work for me 😩

Read more comments on GitHub >

github_iconTop Results From Across the Web

Highlight textField in red when user type incorrect input
In order to change a UITextfield border property you need to access it's layer's border color and border width properties:
Read more >
How do I change the colour of the error state field borders ...
Hello Ryan,. To change the border color of the error message, inject this CSS: .form-line-error input:not(#coupon-input),.form-line-error ...
Read more >
border-color - CSS: Cascading Style Sheets - MDN Web Docs
The border-color shorthand CSS property sets the color of an element's border.
Read more >
Solved: Change Text Input Control border color based on if...
When I set Button1 to this, the border color of the TextInput1 control does not change. My goal is to set required TextInput...
Read more >
HTML DOM Style borderColor Property - W3Schools
Example. Change the color of the four borders of a <div> element to red: document.getElementById("myDiv") ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found