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
3ca74c01
Commit
3ca74c01
authored
Sep 24, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1084 from edx/jmclaus/bugfix_focus_speed_control
Focus speed control
parents
427386c9
3a5d7d86
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
+20
-0
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
+3
-0
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
View file @
3ca74c01
...
...
@@ -138,6 +138,26 @@
expect
(
videoSpeedControl
.
currentSpeed
).
toEqual
(
0.75
);
});
});
describe
(
'make sure the speed control gets the focus afterwards'
,
function
()
{
var
anchor
;
beforeEach
(
function
()
{
initialize
();
anchor
=
$
(
'.speeds > a'
).
first
();
videoSpeedControl
.
setSpeed
(
1.0
);
spyOnEvent
(
anchor
,
'focus'
);
});
it
(
'when the speed is the same'
,
function
()
{
$
(
'li[data-speed="1.0"] a'
).
click
();
expect
(
'focus'
).
toHaveBeenTriggeredOn
(
anchor
);
});
it
(
'when the speed is not the same'
,
function
()
{
$
(
'li[data-speed="0.75"] a'
).
click
();
expect
(
'focus'
).
toHaveBeenTriggeredOn
(
anchor
);
});
});
});
describe
(
'onSpeedChange'
,
function
()
{
...
...
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
View file @
3ca74c01
...
...
@@ -283,6 +283,9 @@ function () {
this
.
videoSpeedControl
.
currentSpeed
);
}
// When a speed entry has been selected, we want the speed control to
// regain focus.
parentEl
.
parent
().
siblings
(
'a'
).
focus
();
}
function
reRender
(
params
)
{
...
...
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