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
f4372c3f
Unverified
Commit
f4372c3f
authored
Oct 30, 2017
by
Braden MacDonald
Committed by
GitHub
Oct 30, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #142 from open-craft/josh/fix-ie11
Fixes failure when loading background image on IE11
parents
17c63ea0
1db177ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
drag_and_drop_v2/public/js/drag_and_drop.js
+8
-0
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
f4372c3f
...
...
@@ -988,6 +988,14 @@ function DragAndDropBlock(runtime, element, configuration) {
var
promise
=
$
.
Deferred
();
var
img
=
new
Image
();
img
.
addEventListener
(
"load"
,
function
()
{
if
(
img
.
width
==
0
||
img
.
height
==
0
)
{
// Workaround for IE11 issue with SVG images
document
.
body
.
appendChild
(
img
);
var
width
=
img
.
offsetWidth
;
var
height
=
img
.
offsetHeight
;
document
.
body
.
removeChild
(
img
);
img
.
width
=
width
,
img
.
height
=
height
;
}
if
(
img
.
width
>
0
&&
img
.
height
>
0
)
{
promise
.
resolve
(
img
);
}
else
{
...
...
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