v-money icon indicating copy to clipboard operation
v-money copied to clipboard

Cursor at the click position when click on v-money instead of moved to the most right

Open spicydog opened this issue 7 years ago • 3 comments
trafficstars

When check on v-money, how to make cursor appear on at the clicked position.

For example, when I click at the front of the box, the cursor should appear at the front.

However, at the moment, when v-money is focused, the cursor always on the back.

Is there an option to make cursor appear at the clicked position like vue-the-mask?

Thanks.

spicydog avatar Jan 15 '18 06:01 spicydog

This is intended behaviour. I agree that it shouldn't be like this, but this commit explicitly sets this as the normal behaviour (despite contradicting how inputs normally work).

thedamon avatar Sep 18 '18 16:09 thedamon

I found a workaround for this like so:

<input
	type="text"
	@focus="fixFocus($event)"
	v-model="amount"
	v-money="{...}"
/>

And in methods:

methods : () {
	fixFocus (event) {
		event.stopImmediatePropagation()
	}
}

benjaminprojas avatar May 27 '19 15:05 benjaminprojas

I have this problem too. but @focus="fixFocus($event)" not work for me, can you help me?

nekooee avatar Dec 02 '22 23:12 nekooee