Skip to content

Commit

Permalink
Call onValueChanged on android devices as well, fixes #356 (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurk91 authored and nosir committed Jun 3, 2018
1 parent 17bf622 commit 21c85d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Cleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ Cleave.prototype = {
window.setTimeout(function () {
owner.element.value = pps.result;
owner.setCurrentSelection(endPos, oldValue);
owner.callOnValueChanged();
}, 1);

return;
Expand All @@ -334,6 +335,12 @@ Cleave.prototype = {
owner.element.value = pps.result;
owner.setCurrentSelection(endPos, oldValue);

owner.callOnValueChanged();
},

callOnValueChanged: function () {
var owner = this,
pps = owner.properties;
pps.onValueChanged.call(owner, {
target: {
value: pps.result,
Expand Down

0 comments on commit 21c85d6

Please sign in to comment.