Disable caret positionning on resetPattern #30

Merged
merged 1 commit into from Mar 3, 2014

Projects

None yet

3 participants

Contributor

Main issue : there is no way to format the input when it is updated with 'val()' function.
Calling 'resetPattern' is the good solution, unfortunally the input get focus; this cause troubles on IE7 (inputs are blinking continuously) and on modern browsers since focus are stolen.
So I disabled the caret manipulation on 'resetPattern'

@fabdouglas fabdouglas Disable caret positionning on reset
Main issue : there is no way to format the input when it is updated with 'val()' function.
Calling 'resetPattern' is the good solution, unfortunally the input get focus; this cause troubles on IE7 (inputs are blinking continuously) and on modern browsers since focus are stolen.
So I disabled the caret manipulation on 'resetPattern'
c42d4a5
Contributor

+1 to this. Did not expect resetPattern to steal focus.

Owner

Much appreciated on yet another PR :D Would love to see a test implemented to confirm the fix and avoid and future regression.

https://github.com/firstopinion/formatter.js/blob/master/test/formatter.js#L289

Thanks again!

@jaridmargolin jaridmargolin added the bug label Feb 28, 2014
@jaridmargolin jaridmargolin merged commit c42d4a5 into firstopinion:master Mar 3, 2014

1 check passed

default The Travis CI build passed
Details
@fabdouglas fabdouglas deleted the fabdouglas:patch-1 branch Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment