Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-35840 SCORM TOC: fixed a typo, improvements on getting the focus

  • Loading branch information...
commit 18c3001eb419aa18253aaf745c1136b95ba66735 1 parent 9e8c6c7
@scara scara authored danmarsden committed
Showing with 9 additions and 0 deletions.
  1. +9 −0 mod/scorm/module.js
View
9 mod/scorm/module.js
@@ -493,6 +493,15 @@ M.mod_scorm.init = function(Y, hide_nav, hide_toc, toc_title, window_name, launc
tree.expandAll();
tree.render();
+ // On getting the window, always set the focus on the current item
+ Y.YUI2.util.Event.on(window, 'focus', function (e) {
+ var current = scorm_tree_node.getHighlightedNode();
+ var left = scorm_layout_widget.getUnitByPosition('left');
+ if (current && left.expand) {
+ current.focus();
+ }
+ });
+
// navigation
if (scorm_hide_nav == false) {
scorm_nav_panel = new Y.YUI2.widget.Panel('scorm_navpanel', { visible:true, draggable:true, close:false, xy: [250, 450],
Please sign in to comment.
Something went wrong with that request. Please try again.