Closed TooAngel closed 8 years ago
@TooAngel I have pushed a commit to try and fix this issue. I am not 100% sure about the fix, so would you be able to test with the latest master branch? The difference now is that the text can change when gaining focus on the input box again.
Hey, cool, this works better. The format is corrected as soon as I refocus the field.
When thinking how I would solve it, I also thought about just placing the cursor before the closing parenthesis. So if you are typing the parenthesis is added, but you can complete your typing.
But the current solution is also fine. Thanks :+1:
Is there anything I can do to speed up the release of the change?
I wasn't quite happy with the solution above because ngModel
was in the incorrect format and then that could be saved to the database.
So I tried to implement a solution with automatic cursor repositioning. But browser support is a large issue with that. And spaces could automatically be added, so we may not know exactly where to put the cursor.
I then went back to the above solution, but added a blur formatter. I feel this is currently the best solution.
Fixed in commit c606075c6f6dd3107cac6186178c29ea8fcadcc0 and released in v1.0.3
K, cool, thx
Using
examples/01-simple.html
and setting format torgb
. When deleting the last two parts with parenthesis (255, 255)
), on adding new values like3,2
the closing parenthesis is automatically added and the cursors is placed behind. This can be annoying if your color value is more than one digit.