You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow highlighting multiple elements per step #525
I want to attach a step to an element with fixed width & height, this element has a div child (a dropdown content) positioned with the "absolute" css property.
When i configure the attachTo; element: '.parent-element'. the opac layer cover the entire screen, except my element, but the child element is not visible and covered by the opac layer.
Do you have any solution to not cover the parent element and his child ? or a way to specify multiple highlighted elements ?
@jujaysmile I'm not sure I understand, is the child element not inside the parent? If the parent is highlighted, the child should be as well. Can you provide a small example for us to play with?
@jujaysmile The issue is you are setting a width and height on the parent. We use getBoundingClientRect to get the size of the element and highlight it. You'll have to allow the size to grow to accommodate the child. You could also try setting a super large modalOverlayOpeningPadding to add extra space to the opening, but that's likely not going to work super well.
@rwwagner90 OK, thanks for your answer, I understand the problem. Do you know if there is a way to specify multiple highlighted elements (in this case .parent & .child), i think it will be the perfect solution in this case.
@jujaysmile it's not currently supported. There was an issue opened for it in the past #356
The problem is if you allowed multiple elements in attachTo how would we know what to attach the tooltip to? We would have to add a new option to add additional highlighted items and create openings for them. Is this something you would like to work on perhaps?
@rwwagner90, ok. I am currently working on a big project and don't have a lot of time right now. But maybe in some times. I am interested by the concept of your tool.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@Heziode that's a great use case and had us looking in how this could be supported without a big refactor. You can actually use absolute positioning around the colgroup in your table to accomplish this pretty quickly. e.g.,
Reacted by Quentin Dauprat, PhD, Aziz Khoury and Lei
edit: I did solve my issue with having multiple <tbody> tags, one for each section, it would still be nice to "add additional highlighted items" as mentioned by @rwwagner90
@akhoury I believe we were saying you can create a div or some absolute positioned element over the thing you want to highlight, and then you can use that as the target, thus highlighting everything.
Activity
RobbieTheWagner commentedon Aug 20, 2019
@jujaysmile I'm not sure I understand, is the child element not inside the parent? If the parent is highlighted, the child should be as well. Can you provide a small example for us to play with?
jujaysmile commentedon Aug 20, 2019
@rwwagner90 hi, yes, the child element is inside the parent.
Here is my code
HTML
CSS
JS
And here a screenshot
Thanks for your help !
RobbieTheWagner commentedon Aug 20, 2019
@jujaysmile The issue is you are setting a width and height on the parent. We use
getBoundingClientRectto get the size of the element and highlight it. You'll have to allow the size to grow to accommodate the child. You could also try setting a super largemodalOverlayOpeningPaddingto add extra space to the opening, but that's likely not going to work super well.jujaysmile commentedon Aug 20, 2019
@rwwagner90 OK, thanks for your answer, I understand the problem. Do you know if there is a way to specify multiple highlighted elements (in this case .parent & .child), i think it will be the perfect solution in this case.
RobbieTheWagner commentedon Aug 20, 2019
@jujaysmile it's not currently supported. There was an issue opened for it in the past #356
The problem is if you allowed multiple elements in
attachTohow would we know what to attach the tooltip to? We would have to add a new option to add additional highlighted items and create openings for them. Is this something you would like to work on perhaps?jujaysmile commentedon Aug 20, 2019
@rwwagner90, ok. I am currently working on a big project and don't have a lot of time right now. But maybe in some times. I am interested by the concept of your tool.
[-]attachTo element with absolute child[/-][+]Allow highlighting multiple elements per step[/+]RobbieTheWagner commentedon Aug 25, 2019
@jujaysmile When do you think you might have some time?
stale commentedon Sep 24, 2019
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
13 remaining items
stale commentedon Mar 14, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commentedon Apr 14, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
RobbieTheWagner commentedon Apr 14, 2020
@chuckcarpenter would you want to take a stab at this one?
chuckcarpenter commentedon Apr 17, 2020
@Heziode that's a great use case and had us looking in how this could be supported without a big refactor. You can actually use absolute positioning around the colgroup in your table to accomplish this pretty quickly. e.g.,
RobbieTheWagner commentedon May 3, 2020
@chuckcarpenter should we document your approach here in the cookbook and then close the posibility of highlighting multiple things for now?
akhoury commentedon May 4, 2020
The colgroup solution wouldn't work on multiple rows? say you have a
<tr colspan=x>which represents a section of the following<tr>s, for examplehttps://codepen.io/akhoury/pen/KKdZVPm?editors=0011
edit: I did solve my issue with having multiple
<tbody>tags, one for each section, it would still be nice to "add additional highlighted items" as mentioned by @rwwagner90RobbieTheWagner commentedon May 4, 2020
@akhoury I believe we were saying you can create a div or some absolute positioned element over the thing you want to highlight, and then you can use that as the target, thus highlighting everything.
akhoury commentedon May 4, 2020
ah ok, right. thanks.