The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
As everyone probably knows, Canvas will slowly be getting rid of enhanceable_content/jQuery UI, including the pop-up dialogs (accordions are already gone). Below is way to get the effect of a dialog, but using the "element_toggler" ability instead. It has more a lot markup involved than just using the enhanceable_content dialog invocation, so it basically necessitates copy/paste and thus may not be so useful for many. But, it also has more capability (including being able to be wider than 300px). Here is a template below that will look fairly similar to the Canvas native dialogs. I've also added an html file of this to the bottom because code is hard to render on these boards.
<a class="element_toggler" aria-controls="modal_demo"
aria-label="Toggle demo modal">Modal/Dialog Trigger Link Title</a>
</p>
<div id="modal_demo" style="display: none;">
<div id="modal_overlay" class="ui-widget-overlay container middle-xs center-xs"
style="text-align: left; display: flex; position: fixed; z-index: 11;
left: 84px; top: 0; width: 100%; height: 100%;">
<div id="modal" class="ui-corner-all box-shadow"
style="background-color: #fff; padding: 10px; position: absolute;
width: 100vw; max-width: 600px;">
<div id="modal_header" style="border-bottom: 1px solid #C7CDD1;">
<h2>Modal Title</h2>
</div>
<div id="modal_content">
<p><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Perferendis fugiat libero esse hic, architecto natus provident
excepturi eveniet repellendus cumque accusamus omnis maxime
animi odio sunt modi. Inventore numquam, quisquam.</span></p>
</div>
<div id="modal_footer" class="text-right"
style="border-top: 1px solid #C7CDD1; padding: 10px;">
<a class="element_toggler btn btn-primary ui-corner-all"
role="button" aria-controls="modal_demo"
aria-label="Toggle demo modal"><span class="ui-button-text">Close</span>
</a>
</div>
</div>
</div>
</div>Some notes:
<a class="element_toggler" aria-controls="simple_modal"
aria-label="Toggle simple_modal modal">
Simple Modal Trigger</a>
<div id="simple_modal" style="display: none;">
<div class="ui-widget-overlay container middle-xs center-xs"
style="text-align: left; display: flex; position: fixed; z-index: 11;
left: 84px; top: 0; width: 100%; height: 100%;">
<div id="modal" class="ui-corner-all"
style="background-color: #fff; padding: 10px; position: absolute;
width: 100vw; max-width: 600px;">
Put all your modal content here!
<div class="text-right">
<a class="element_toggler btn btn-primary ui-corner-all"
role="button" aria-controls="simple_modal"
aria-label="Toggle simple_modal modal">
<span class="ui-button-text">Close</span>
</a>
</div>
</div>
</div>
</div>Disclaimer: Presented without warranty, any claims to longevity, optimum efficiency/semantic adherence, IE and mobile app capability, etc etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
An amazing Instructure Community member!
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in