Skip to content

Commit cfe290d

Browse files
committed
gw-choice-counter.php: Fixed an issue with Choice Counter not working for Image Choice field.
1 parent 42b1f7d commit cfe290d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gravity-forms/gw-choice-counter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ function output_script() {
9090
// Event handler for all listeners to avoid DRY and to maintain a pointer reference to the function
9191
// which we can use to explicity unbind event handlers
9292
self.updateChoiceEventHandler = function() {
93-
setTimeout( function() {
93+
requestAnimationFrame( function() {
9494
self.updateChoiceCount( self.formId, self.choiceFieldIds, self.countFieldId, self.values );
95-
}, 10 ); // 10ms delay gives DOM time to reflect input change
95+
}); // 10ms delay gives DOM time to reflect input change
9696
};
9797

9898
self.init = function() {

0 commit comments

Comments
 (0)