Unverified Commit 78b34357 by Braden MacDonald Committed by GitHub

Merge pull request #141 from open-craft/fix-ie11

Fix: in IE11, the resize detector was blocking content
parents f4372c3f ef1a3fc3
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
overflow: hidden; overflow: hidden;
pointer-events: none; pointer-events: none;
z-index: -1; z-index: -1;
visibility: hidden;
} }
.xblock--drag-and-drop .initial-load-spinner { .xblock--drag-and-drop .initial-load-spinner {
......
...@@ -648,6 +648,7 @@ function DragAndDropTemplates(configuration) { ...@@ -648,6 +648,7 @@ function DragAndDropTemplates(configuration) {
// image to 100%, so that it doesn't expand the container. // image to 100%, so that it doesn't expand the container.
if (ctx.drag_container_max_width === null) { if (ctx.drag_container_max_width === null) {
target_img_style.maxWidth = '100%'; target_img_style.maxWidth = '100%';
item_bank_properties.style = {display: 'none'};
} else { } else {
drag_container_style.maxWidth = ctx.drag_container_max_width + 'px'; drag_container_style.maxWidth = ctx.drag_container_max_width + 'px';
} }
......
...@@ -178,6 +178,9 @@ class SizingTests(InteractionTestBase, BaseIntegrationTest): ...@@ -178,6 +178,9 @@ class SizingTests(InteractionTestBase, BaseIntegrationTest):
self.browser.execute_script('$(".wrapper-workbench").css("margin-right", "-{}px")'.format(40 + scrollbar_width)) self.browser.execute_script('$(".wrapper-workbench").css("margin-right", "-{}px")'.format(40 + scrollbar_width))
# And reduce the wasted space around our XBlock in the workbench: # And reduce the wasted space around our XBlock in the workbench:
self.browser.execute_script('return $(".workbench .preview").css("margin", "0")') self.browser.execute_script('return $(".workbench .preview").css("margin", "0")')
# Dynamically adjusting styles causes available screen width to change, but does not always emit
# resize events consistently, so emit resize manually to make sure the block adapts to the new size.
self.browser.execute_script('$(window).resize()')
def _check_mobile_container_size(self): def _check_mobile_container_size(self):
""" Verify that the drag-container tightly fits into the available space. """ """ Verify that the drag-container tightly fits into the available space. """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment