You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After pasting code, that has required length the complete event is not triggered.
Console shows error like: Uncaught TypeError: Cannot read property 'removeAttribute' of null
I managed to change part of paste event, which fixes that error (You should not focus field further than last):
But also after that complete event is not triggered.
I read that it is run only on input event in your code. I wonder if it relates to browsers triggering or not input event on paste? I had to also manually dispatch event on each input field in paste event to make it work.
pasteField.dispatchEvent(newEvent('input'));
Btw it is possible to paste more digits than one in fields other than first.
I know this is a lot, but can you look into that?
System configuration
Browser: Chrome 80.0.3987.106 (Mac)
The text was updated successfully, but these errors were encountered:
I'm also having this problem. I solved it like this:
for (var i = 0; i < that.settings.fields; i++){
var pasteField = that.getField(i);
pasteField.removeAttribute('readonly');
pasteField.value = pasted[i];
that.values[i] = pasted[i];
if (!that.validateInput(i))
break;
if (i < pasted.length - 1) {
that.focus(i + 1);
} else {
if (that.settings.hideinput)
this.value = that.settings.placeholder;
var pin = that.values.join('');
// reset the plugin
if (that.settings.reset)
that.reset();
// fire complete callback
that.settings.complete(pin);
}
}
After pasting code, that has required length the complete event is not triggered.
Console shows error like:
Uncaught TypeError: Cannot read property 'removeAttribute' of null
I managed to change part of paste event, which fixes that error (You should not focus field further than last):
But also after that complete event is not triggered.
I read that it is run only on input event in your code. I wonder if it relates to browsers triggering or not input event on paste? I had to also manually dispatch event on each input field in paste event to make it work.
Btw it is possible to paste more digits than one in fields other than first.
I know this is a lot, but can you look into that?
System configuration
Browser: Chrome 80.0.3987.106 (Mac)
The text was updated successfully, but these errors were encountered: