Skip to content

Commit 18c8d16

Browse files
committed
Forcing element value to update later
Updating the value outside of the scope digest cycle appears to fix issue #9.
1 parent 59a79d0 commit 18c8d16

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/tai-placeholder.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@
7373
$element.addClass(className);
7474

7575
if (needsShim) {
76-
$element.val(text);
76+
/* Add a delay so the value isn't assigned to
77+
* scope. Issue #9
78+
*/
79+
setTimeout(function () {
80+
$element.val(text);
81+
}, 1);
7782
}
7883
}
7984
});

0 commit comments

Comments
 (0)