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.

v-model breaks selectionStart

See original GitHub issue

Vue.js version

1.0.24

Reproduction Link

https://github.com/kucherenkovova/piano/tree/BUG-report-vue go to demo folder and open index.html

Steps to reproduce

Input something into the Email layout input field. Put the cursor in the middle of your text. Hit backspace on the virtual keyboard.

What is Expected?

The text will be removed in the cursor position.

What is actually happening?

The text removes from the end of the string. selectionStart attribute is changed somehow by Vue.js

P.S. You can test it on other input elements which do not have v-model on it.Everything will work well.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
posvacommented, Jun 8, 2016

I didn’t had internet yesterday 😢 I hope being able to do it this evening

1reaction
kucherenkovovacommented, Jun 6, 2016

@posva Hi again! Here’s a codepen with repro Steps to reproduce:

  1. Insert text into first input
  2. Select some text
  3. Click a button near your input

Looking forward for your response!

Read more comments on GitHub >

github_iconTop Results From Across the Web

selectionStart/selectionEnd on input type="number" no longer ...
Selection is only permitted with text/search, URL, tel and password. The likely reason that selection has been disabled for inputs of type number...
Read more >
Form Textarea | Components - BootstrapVue
Create multi-line text inputs with support for auto height sizing, minimum and maximum number of rows, and contextual validation states.
Read more >
trigger a context menu in a q-input textarea when selecting text
I'm trying to obtain a context menu that is triggered on a q-input textarea as soon as a word is selected. Here is...
Read more >
Document Object Model (DOM) Level 3 Events Specification
This specification defines the Document Object Model Events Level 3, a generic platform- and language-neutral event system which allows ...
Read more >
TextBox | Roblox Creator Documentation
When used in conjunction with the SelectionStart property, it is possible to both ... This is achieved by breaking long lines of text...
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