Hi all,
Using the adapt-contrib-glossary in previous courses I've developed, if I put a link to a glossary item in the content and clicked it, the following would happen:
- the drawer would open at the glossary
- the selected glossary term would be highlighted
- the term's description would be expanded
Now it seems 1 & 2 still happen, but 3 doesn't. And because the term is highlighted, you have to click on it twice to expand the description.
This issue causes further trouble for me as I have long glossaries that scroll. I've been using the following code in adapt-contrib-glossaryItemView.js here to 'auto-scroll' the glossary if the description is off the bottom of the screen:
showGlossaryItemDescription: function() {
var $glossaryItemTerm = this.$('.glossary-item-term');
var $description = $glossaryItemTerm.addClass('selected').siblings('.glossary-item-description');
$description.slideDown(400, _.bind(function() {
this.$el.parents('.drawer').scrollTo($glossaryItemTerm, 1000);
$description.a11y_focus();
}, this));
$glossaryItemTerm.attr('aria-expanded', false);
this.model.set('_isDescriptionOpen', true);
},
This works fine if you're just browsing the glossary, but if you've arrived there from a link in the content it doesn't work at all, presumably becuse showGlossaryItemDescription() isn't getting called. The end result is you click the link, the glossary drawer opens, and nothing else, because the (unexpanded) selected term is off the bottom of the screen.
Please could someone help with this? I think if the description expanding issue is fixed the second problem will be fixed too.
Many thanks in advance. Chris