MaskTextField input mask with space
Closed this issue · 2 comments
I'm not sure I allowed post this but couldn't find any other place I can post question.
I'm not sure it is problem but, the mask input mask does not seem work well with space. For example, with input mask "999-999-9999", user can enter only numbers and the field take care of the format but if the mask has space like "(999) 999-9999", it stops at the space and user have to enter the space.
I think user should be able to enter only numbers with space.
Thanks.
We indeed don't allow skipping if the next char is a placeholdchar. See line 643 of https://github.com/jidesoft/jidefx-oss/blob/master/module-fields/src/main/java/jidefx/scene/control/field/MaskTextField.java where we have existingText.charAt(caret) != getPlaceholderCharacter(). A quick fix is to call field.setPlaceholderCharacter('_') or we could make it an option in the future.
Thanks for quick reply. I think I better stick to the "999-999-9999" format now then. Using under bar('_') seems not neat as using space. I hope you will add a option of handling space in the future.