wet-boew-styleguide icon indicating copy to clipboard operation
wet-boew-styleguide copied to clipboard

LightBox scrolls away from table row when opened

Open danielt113 opened this issue 9 years ago • 0 comments

I have a large table with text in it that open LightBoxes for a description of what the text means. I've done this because tooltips are not accessible and footnotes scroll the user away from their current table row.

When you click the lightbox it scrolls the page all the way to the top, then when you close the lightbox it anchors to the row you were on before. This is a huge issue with a table because you completely lose your place in the table. Is there a way to prevent the LightBox from scrolling the page when it opens and closes?

Here is the HTML for the LightBox I'm opening: <section id="Receive_by_mail" class="mfp-hide modal-dialog modal-content overlay-def"> <header class="modal-header"> <h2 class="modal-title">Delivery by mail</h2> </header> <div class="modal-body"> <p>Ready in 20 business days. Delivery time may vary.</p> </div> </section> I open the LightBox using an onlick event: onclick='helptext(Receive_by_mail);

danielt113 avatar Feb 23 '16 21:02 danielt113