I'm having a problema with this code taht all my textarea boxes don't get the 'enter' keypress.
I know that deleting the code on line 848, the textareas start working again, but then, the mask wont work.
var returnVal = eventHandler.apply(that, arguments);
return trackCaret && (trackCaret = !1, setTimeout(function() {
caret(that, that.inputmask.caretPos, undefined, !0);
})), !1 === returnVal && (e.preventDefault(), e.stopPropagation()), returnVal;
I'm only applying the mask on an input inside the form, so, no need to mess with the textarea funcionality.
Any idea?
Thnx.
So, anyone? Any idea? I really love this plugin, but I need the textarea to work. =/
@marcelohcortez ,
Can you try with removing 13 from the ignorables option. See inside the inputmask.js.
Let me know if it works and I create a permanent fix when used on a textarea.
Sadly, it didn't work.
Any other ideas?
Ty
@marcelohcortez ,
I will have a look.
@marcelohcortez,
It is because enter does not validate as a valid character. I will see for a solution.
Thnx a lot =)
@marcelohcortez ,
I have just reread the initial question. Do you need any masking on the textarea?
Can you share some code. How do you initialize the inputmask.
I don't need any mask in the textarea. Just using it on a postal code input.
I used the code to create a plugin for WordPress to use on my project. It's all initialized and working properly.
I just took the site down from the testing server and I'm using only a localhost version now. The textarea is plain html
On the page I call it with:
jQuery(document).ready(function($) {
$(":input").inputmask();
});
And I use something like:
data-inputmask="'mask': '9999-999'"
in the inputs I need to use the mask on.
Ah, that is something else. When you mask an element without any options. There is a regex mask applied with .* as validator. The :input selector also selects the textarea. The fastest solution for you is to change the selector to input.
jQuery(document).ready(function($) { $("input").inputmask(); });
I will make some changes on my side, to only apply the mask when the user passed some option.
That worked.
Thnx a lot for the plugin and for the help =)
it worked:
jQuery(document).ready(function($) { $("input").inputmask(); });
Most helpful comment
Ah, that is something else. When you mask an element without any options. There is a regex mask applied with .* as validator. The :input selector also selects the textarea. The fastest solution for you is to change the selector to input.
jQuery(document).ready(function($) { $("input").inputmask(); });I will make some changes on my side, to only apply the mask when the user passed some option.