LeaVerou / incrementable

Increment length values in textfields

Home Page:https://incrementable.verou.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When you decrement a value and it loses a digit, the caret become unattached to value

kizu opened this issue · comments

Here is an example: You have the following situation (| — the caret):

background: linear-gradient(10deg|, #fed 50%, #fdc 50%);

If you'd decrement the value, 10 would become the 9 and the caret would become unattached to value:

background: linear-gradient(9deg,| #fed 50%, #fdc 50%);

This is bad, 'cause if you'd increment or decrement after that, the command won't work and you'd jump to the start/end of the input instead.

The same thing happens if you'd decrement the value by .1 from 10.1em|, but in that case you'd need to adjust the caret's position by two characters to left.

Cannot reproduce in v2, closing