Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
xblock-drag-and-drop-v2
Commits
78b34357
Unverified
Commit
78b34357
authored
Oct 30, 2017
by
Braden MacDonald
Committed by
GitHub
Oct 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #141 from open-craft/fix-ie11
Fix: in IE11, the resize detector was blocking content
parents
f4372c3f
ef1a3fc3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
drag_and_drop_v2/public/css/drag_and_drop.css
+1
-0
drag_and_drop_v2/public/js/drag_and_drop.js
+1
-0
tests/integration/test_sizing.py
+3
-0
No files found.
drag_and_drop_v2/public/css/drag_and_drop.css
View file @
78b34357
...
@@ -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
{
...
...
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
78b34357
...
@@ -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'
;
}
}
...
...
tests/integration/test_sizing.py
View file @
78b34357
...
@@ -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. """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment