Assistance Needed with Centering Modal in Canvas LTI Tool

Jump to solution
HarryD
Community Member

Hello Canvas Community,

I'm relatively new to LTI tool development and currently facing a challenge with modal implementation in an LTI tool embedded within an iframe. Although the modal opens as expected, it's not centered on the full Canvas page - it aligns only within the confines of the iframe.

To give some context, I've been using window.postMessage for communication with the parent window, primarily for resizing the iframe to increase its height. However, I'm now looking to find a way to append the modal directly to the Canvas parent window, or at least to make it appear as if it's centered on the full page rather than just the iframe.

I believe the solution might involve further utilization of postMessage or a different approach that I might not be aware of. Any guidance, advice, or insights from those who have tackled similar issues would be greatly appreciated. I’ve also included a screenshot below to illustrate the current issue.

Thank you in advance for your help!canvas modal issue with iframe.png

0 Likes
1 Solution
chriscas
Community Coach
Community Coach

Hi @HarryD,

I moved your post over to the Developers group to see if anyone there might have any suggestions.  As a Canvas administrator, i'd say having the modal centered on the content area as it is right now would actually be my preference.

-Chris

View solution in original post

0 Likes