Revert "change the minimum height of the iframe used for LTI messages"

This reverts commit 078a06d50e.

Reason for revert: Broke some iframe heights in canaries

Change-Id: I3a594dc516c4ba03ec1fbd4a24f67a5223c54827
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Mark Starkman <mark.starkman@instructure.com>
This commit is contained in:
Evan Battaglia 2022-03-02 16:53:14 +00:00
parent 5217d0fa7c
commit 8ccdf65306
3 changed files with 5 additions and 33 deletions

View File

@ -119,10 +119,10 @@ div.content_notice {
iframe.info_alert_outline {
border: 2px solid #0374B5 !important;
}
}
iframe.tool_launch {
min-height: 100%;
min-height: 450px;
width: 100%;
height: 100%;
border: none;

View File

@ -111,45 +111,18 @@ test('does not resize any other container', () => {
equal($('.tool_content_wrapper').height(), 300)
})
test('defaults the resize height to the height of `#tool_content`', () => {
test('defaults the resize height to 450px', () => {
document.querySelector('#second-wrapper').className = ''
const launchResizer = new ToolLaunchResizer()
launchResizer.resize_tool_content_wrapper()
equal(
document.querySelector('.tool_content_wrapper').style.height,
document.querySelector('#tool_content').style.height
)
document.querySelector('#second-wrapper').className = 'tool_content_wrapper'
})
test('defaults the resize height to 450px if no `#tool_content` is found', () => {
document.querySelector('#second-wrapper').className = ''
document.querySelectorAll('#tool_content').forEach(element => {
element.id = 'another_tool_content'
})
const launchResizer = new ToolLaunchResizer()
launchResizer.resize_tool_content_wrapper()
equal($('.tool_content_wrapper').height(), 450)
document.querySelectorAll('#another_tool_content').forEach(element => {
element.id = 'tool_content'
})
document.querySelector('#second-wrapper').className = 'tool_content_wrapper'
})
test('defaults the resize height to 450px if non numeric value passed and no `#tool_content` is found', () => {
test('defaults the resize height to 450px if non numeric value passed', () => {
document.querySelector('#second-wrapper').className = ''
document.querySelectorAll('#tool_content').forEach(element => {
element.id = 'another_tool_content'
})
const launchResizer = new ToolLaunchResizer()
launchResizer.resize_tool_content_wrapper({a: 1})
equal($('.tool_content_wrapper').height(), 450)
document.querySelectorAll('#another_tool_content').forEach(element => {
element.id = 'tool_content'
})
document.querySelector('#second-wrapper').className = 'tool_content_wrapper'
})

View File

@ -20,8 +20,7 @@ import $ from 'jquery'
export default class ToolLaunchResizer {
constructor(minToolHeight) {
this.minToolHeight =
minToolHeight || document.querySelector('#tool_content')?.style.height || 450
this.minToolHeight = minToolHeight || 450
}
sanitizedWrapperId(wrapperId) {