Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
e7f029f6
Commit
e7f029f6
authored
Dec 05, 2013
by
Adam Palay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a11y: manage focus appropriately for modals with iframes in IE (LMS-1539)
parent
2852a4f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
common/static/js/src/accessibility_tools.js
+13
-1
lms/templates/wiki/history.html
+3
-3
No files found.
common/static/js/src/accessibility_tools.js
View file @
e7f029f6
...
...
@@ -95,7 +95,7 @@ var accessible_modal = function(trigger, closeButtonId, modalId, mainPageId) {
$
(
"#lean_overlay, "
+
closeButtonId
).
click
(
function
(){
$
(
mainPageId
).
attr
(
"aria-hidden"
,
"false"
);
$
(
modalId
).
attr
(
"aria-hidden"
,
"true"
);
focusedElementBeforeModal
.
focus
()
focusedElementBeforeModal
.
focus
()
;
});
// get modal to exit on escape key
...
...
@@ -107,6 +107,18 @@ var accessible_modal = function(trigger, closeButtonId, modalId, mainPageId) {
$
(
closeButtonId
).
click
();
}
});
// In IE, focus shifts to iframes when they load.
// These lines ensure that focus is shifted back to the close button
// in the case that a modal that contains an iframe is opened in IE.
// see http://stackoverflow.com/questions/15792620/how-to-get-focus-back-for-parent-window-from-an-iframe-programmatically-in-javas
var
initialFocus
=
true
$
(
modalId
).
find
(
"iframe"
).
on
(
"focus"
,
function
()
{
if
(
initialFocus
)
{
$
(
closeButtonId
).
focus
();
initialFocus
=
false
;
};
});
});
};
...
...
lms/templates/wiki/history.html
View file @
e7f029f6
...
...
@@ -72,21 +72,21 @@
tr
.equal
td
{
background-color
:
#F2F2F2
;
}
.diff-container
td
{
white-space
:
pre
;
font-family
:
monospace
;
}
.diff-container
td
,
.diff-container
th
{
padding
:
2px
7px
;
border-right
:
1px
solid
#DDD
;
border-right
:
1px
solid
#DDD
;
}
.diff-container
td
:last-child
,
.diff-container
th
:last-child
{
border-right
:
none
;
}
.diff-container
table
{
border-top
:
1px
solid
#DDD
;
border-top
:
1px
solid
#DDD
;
}
</style>
{% endaddtoblock %}
...
...
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