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

Action button (javascript/sheetworker) does not work when placed in a repeating section table

1646040978

Edited 1646042239
Peter B.
Pro
Sheet Author
Hello Roll20. It appears that when you place an action button in a table in a repeating section, it is not correctly caught by the sheetworker code. It only appears to affect buttons placed in a table cell or table head, and does not seem to be related to any levels of depth of html elements. It only appears to be repeating buttons that are affected by this. "Static" buttons placed in a table cell or head, is working perfectly well. Here is a minimum working example of the code: &lt;button type ="action" name ="act_staticbutton" &gt; Static root button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static 1xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static 2xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static 3xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static 4xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static 5xDiv button - I work ✅ &lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static p button - I work ✅ &lt;/button&gt; &lt;/p&gt; &lt;details&gt; &lt;summary&gt;&lt;/summary&gt; &lt;button type ="action" name ="act_staticbutton" &gt; Static details button - I work ✅ &lt;/button&gt; &lt;/details&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;&lt;button type ="action" name ="act_staticbutton" &gt; Static tabel head button - I work ✅ &lt;/button&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;button type ="action" name ="act_staticbutton" &gt; Static table cell button - I work ✅ &lt;/button&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;br&gt; &lt;hr&gt; &lt;br&gt; &lt;fieldset name ="repeating_section" class ="repeating_section" &gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating root button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating 1xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating 2xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating 3xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating 4xDiv button - I work ✅ &lt;/button&gt; &lt;div&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating 5xDiv button - I work ✅ &lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating p button - I work ✅ &lt;/button&gt; &lt;/p&gt; &lt;details&gt; &lt;summary&gt;&lt;/summary&gt; &lt;button type ="action" name ="act_repbutton" &gt; Repeating details button - I work ✅ &lt;/button&gt; &lt;/details&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;&lt;button type ="action" name ="act_repbutton" &gt; Repeating tabel head button - I DO NOT WORK :( ❌ &lt;/button&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;button type ="action" name ="act_repbutton" &gt; Repeating table cell button - I DO NOT WORK :( ❌ &lt;/button&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/fieldset&gt; &lt;script type ="text/worker" &gt; on("clicked:staticbutton", function(e){ console.log("Static action fired"); console.log(e); }); on("clicked:repeating_section:repbutton", function(e){ console.log("Repeating action fired"); console.log(e); }); &lt;/script&gt; I know that it is recommended not to use tables for creating character sheet, but out right blocking the functionality is taking it too far :) Here is a GIF showing the problem: For higher quality here is the raw video on Youtube:&nbsp; <a href="https://www.youtube.com/watch?v=9ZUeF3xWiIQ" rel="nofollow">https://www.youtube.com/watch?v=9ZUeF3xWiIQ</a>
1646439407
Andreas J.
Forum Champion
Sheet Author
Translator
well, this is on the list now: <a href="https://wiki.roll20.net/Character_Sheet_Development/Bugs_%26_Quirks#Repeating_Sections" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Development/Bugs_%26_Quirks#Repeating_Sections</a>
1646463262
Peter B.
Pro
Sheet Author
Thank you Andreas.&nbsp; I have read through the issues on the wiki page and I can now tell that My bug is identical to this issue&nbsp; <a href="https://app.roll20.net/forum/permalink/10631126" rel="nofollow">https://app.roll20.net/forum/permalink/10631126</a> My post is just more concise and to The point of the bug :)&nbsp;