Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Sheet : number input : not updating attribute everywhere when arrow(s) used

1426594296
Natha
KS Backer
Sheet Author
API Scripter
Got a character sheet with numeric inputs. So they render with the convenient up and down little arrow buttons, that the players tend to use (rather than clicking to enter the field, then typing, then tabbing out / clicking elsewhere to make sure that the update of the value has been taken into account). The problem is (or seems to be) that when a player quickly click the arrows, and then immediately click a button (type "roll") that triggers a roll using the supposedly updated value(s), sometimes the update seem to be ignored by Roll20 (or been taken in account later/too late) : the player's sheet occurance is visually up to date but not the attribute behind, at least on the server/the GM (me) looking at the same player's sheet. FWIW, the roll is calling an API function. I can't reproduce it when testing on my own. I'm under the impression that if the player clicks elsewhere/put the focus in another entry filed after clicking the arrow, the change of focus really triggers the update and the roll is fine (using the updated attribute(s)). But if the focus was the input's arrow and then immediately the button, the update of the attribute isn't triggered (sometimes ?).
1426621910
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
This is something I fixed a while back. It should always update the sheet change before rolling. Can you be provide a repeatable case of where this happens? I've tested it with both regular sheet buttons with macros and api, with macro toolbar buttons, and haven't been able to reproduce your issue.
1426667323
Natha
KS Backer
Sheet Author
API Scripter
Steve K. said: This is something I fixed a while back. It should always update the sheet change before rolling. Can you be provide a repeatable case of where this happens? I've tested it with both regular sheet buttons with macros and api, with macro toolbar buttons, and haven't been able to reproduce your issue. The problem is : I can't reproduce it on my own, it only seems to happen during play with several players connected. Could it be a cache problem on the player's side ? Should I ask them to Ctrl+F5 after connecting to the campaign ?
1426699468
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I don't think so, that shouldn't make a difference to live changes they're making to the sheet.
1426708056
Natha
KS Backer
Sheet Author
API Scripter
Ok, thanks. Could it come from one of my scripts that log changes of some attributes to the GM chat ? on("change:attribute", function(obj, prev) { var attrName = obj.get("name"); var SurveyAttributes = ["might","speed","intellect","damage-track","recovery-rolls","shins","mightedge","speededge","intellectedge","tier","effort","xp","armor","armor-might-cost","armor-speed-reduction","recoverybonus","cypher-limit"] var index; var messageGm = 0; for (index = 0; index < SurveyAttributes.length; index++) { if ( attrName == SurveyAttributes[index] ) { messageGm = index+1; break; }; } if (messageGm > 0) { var characterObj = getObj("character", obj.get("_characterid")); sendChat("GM", "/w gm <b>GM info</b> " + characterObj.get("name") + " : " + attrName + " : " + prev["current"] + "/" + prev["max"] + " => " + obj.get("current") + "/" + obj.get("max") + "." ); if ( messageGm < 5 ) { nathaNumCheckCharStates(characterObj); }; } return; });
1426717218
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
I don't think so, but you should try playing without it for a night and see if that solves the issue.