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

Weird bug on action buttons and css position:relative

January 20 (2 years ago)

Edited January 20 (2 years ago)

Hi,

i'm developping my own character sheet, recently i switch most of my button type="roll" to button type="action" to have a bit more control over what happen when. Those buttons are inside repeatable sections.

Last night, i tried to fancy a bit adding box-shadow and learned how to optimize that, but they advise to put the div in position:relative for some reasons not important here.


My problem:

I have a div that "group" buttons with a css rule, and when i put position:relative on it, the js binding on the click is broken ...
Even more, if i put position:relative on any div above in my repeated item, i break the js hook.
i can't figure out why.

The first position:relative div above is the repitem which is automatically generated by roll20

is there a reason behind my issue ? do you have any clue/solutions on that ?

January 20 (2 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

This is a long standing bug with no solution unfortunately. Any position other than the default static on anything containing the button or the button itself, other than the repitem causes it. I recommend css grid for most positioning needs. It can't handle everything position could, but it can do a lot.

January 20 (2 years ago)

Edited January 21 (2 years ago)

okay thanks a lot for your response !