Skip to content
This repository was archived by the owner on Dec 11, 2017. It is now read-only.

Clear buffer when shifting characters to the left#256

Merged
digitalBush merged 1 commit intodigitalBush:masterfrom
angelanicholas:bug-clear-buffer-after-shifting-chars
Oct 8, 2014
Merged

Clear buffer when shifting characters to the left#256
digitalBush merged 1 commit intodigitalBush:masterfrom
angelanicholas:bug-clear-buffer-after-shifting-chars

Conversation

@angelanicholas
Copy link

This PR fixes a bug where if you type characters at the end of an input mask with autoclear set to false and then blur/focusout, the typed characters are shifted to the beginning of the mask (left) but then also duplicated at their original typed position... resulting in some wacky entries like "(44_) ___ - __44". Further focusing / blurring on the input field would repeat this strange duplication + shifting issue.

This fix duplicates the solution found in #175 and adds a test.

Now, we're clearing the buffer (removing trailing characters) if your cursor position is greater than the length of your input after the characters have been shifted left.

@digitalBush digitalBush added this to the 1.4 milestone Oct 8, 2014
digitalBush added a commit that referenced this pull request Oct 8, 2014
…hars

Clear buffer when shifting characters to the left
@digitalBush digitalBush merged commit 86ccfdc into digitalBush:master Oct 8, 2014
@digitalBush
Copy link
Owner

Awesome! Thanks you for the test @akn102!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants