Retry "Don't allow LTI tool to be larger than its modal"

This reverts/modifies commit d981d1248b,
trying to fix the issue slightly differently.

Test plan:
- launch an LTI tool in a modal as follows. The LTI 1.3 test tool
  works for this because it has content that is taller than the modal,
  although you could probably inspect element and add content to make it
  taller too.
  - tool installed with link_selection -- goto modules, add an item,
    choose External Tool and/or new assignment -> Submission Type ->
    External Tool -> Find -> click your tool
- send a postMessage from within the iframe. The iframe should resize if smaller,
  but if the height requested is bigger than the modal, the iframe
  should be only as big as the modal and all content should still be visible via
  scrolling
  - parent.postMessage('{"subject":"lti.frameResize", "height":100}', '*')
  - parent.postMessage('{"subject":"lti.frameResize", "height":2000}', '*')
- resize the modal. whatever the size, the iframe and modal should be the
  same size, including when the modal is taller than 550px.

Change-Id: I8258acc1769a2f6c5d2cab4805128f0e453d0620
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232753
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
This commit is contained in:
Evan Battaglia 2020-04-02 18:16:09 -06:00
parent 8ebaeaab23
commit c7f289b36b
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ SelectContentDialog.Events = {
$dialog.append(
$('<iframe/>', {
id: 'resource_selection_iframe',
style: `width: 800px; height: ${frameHeight}px; max-height: ${frameHeight}px; border: 0;`,
style: `width: 800px; height: ${frameHeight}px; max-height: 100%; border: 0;`,
src: '/images/ajax-loader-medium-444.gif',
borderstyle: '0',
tabindex: '0',