Merge branch 'MDL-51838-master' of git://github.com/damyon/moodle

This commit is contained in:
Dan Poltawski
2015-10-28 11:53:53 +00:00
2 changed files with 10 additions and 1 deletions
File diff suppressed because one or more lines are too long
+9
View File
@@ -137,6 +137,15 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
element.attr('aria-selected', true).attr('id', itemId);
// Tell the input field it has a new active descendant so the item is announced.
inputElement.attr('aria-activedescendant', itemId);
// Scroll it into view.
var scrollPos = element.offset().top
- suggestionsElement.offset().top
+ suggestionsElement.scrollTop()
- (suggestionsElement.height() / 2);
suggestionsElement.animate({
scrollTop: scrollPos
}, 100);
};
/**