From 5371fa19283ff23f049aed7f749bbef5f55d6e44 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Thu, 6 Sep 2012 14:25:26 +0800 Subject: [PATCH] MDL-30829 Accessibility: Docking a block disables the accessible anchors --- blocks/dock.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/blocks/dock.js b/blocks/dock.js index 5560a32d7aa..5e4a56ffce8 100644 --- a/blocks/dock.js +++ b/blocks/dock.js @@ -863,6 +863,12 @@ M.core_dock.genericblock.prototype = { return; } + // Disable the skip anchor when docking + var skipanchor = node.previous(); + if (skipanchor.hasClass('skip-block')) { + skipanchor.hide(); + } + var blockclass = (function(classes){ var r = /(^|\s)(block_[a-zA-Z0-9_]+)(\s|$)/; var m = r.exec(classes); @@ -937,6 +943,12 @@ M.core_dock.genericblock.prototype = { return_to_block : function(dockitem) { var placeholder = this.Y.one('#content_placeholder_'+this.id); + // Enable the skip anchor when going back to block mode + var skipanchor = placeholder.previous(); + if (skipanchor.hasClass('skip-block')) { + skipanchor.show(); + } + if (this.cachedcontentnode.one('.header')) { this.cachedcontentnode.one('.header').insert(dockitem.contents, 'after'); } else {