Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
Vuejs - Text gets reversed when typing after selecting all

I'm facing a weird issue. The text in a particular inputbox gets reversed if I enter a text after selecting all the current text. Please see the image below. I have created a textfield component that is used in the parent component. I'm not sure how to debug this. Tried using chrome inspect tools, but couldn't find anything useful. Also tried using below CSS

direction: ltr !important;

enter image description here

The component code is

template>
    <div>
        <div class="form-group">
            <label :for="question.q_question">{{question.q_question}}</label>
            <input 
                type="text"
                class="form-control write-direction" 
                v-model="value"
                :id="question.q_question" 
                :name="question.q_question" value=""
                @keyup="handleTextboxValue"
                >
        </div>
    </div>
</template>
<script>

export default {
    props: ['question'],
    data() {
        return {
            value: ''
        }
    },
    methods:{
        handleTextboxValue() {
            this.$emit('handleTextboxValue', this.question, this.value)
        }
    }
}
</script>
<style scoped>

label {
  text-transform: capitalize;
}
.write-direction {
    direction: ltr !important;
}
</style>

EDIT This appears to happen only with google chrome. I tested with firefox and its working correctly.

EDIT2 I found this thread - How to avoid html input fields typing backwards in chromium browsers?

https://support.google.com/chrome/thread/15141703/google-randomly-starts-typing-backwards-input-character-moves-r-to-l-instead-of-l-to-r?hl=en

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda