Commit 5ab492e4 authored by Sean Roberts's avatar Sean Roberts Committed by GitHub

Merge pull request #136 from hypothesis/fix-direct-link-scroll

Fix scrolling to direct-linked annotations
parents 36ab62bf d61ba101
......@@ -271,7 +271,7 @@ describe('WidgetController', function () {
};
annotationUI.addAnnotations([annot]);
$scope.$digest();
$rootScope.$broadcast(events.ANNOTATIONS_SYNCED, [{tag: 'atag'}]);
$rootScope.$broadcast(events.ANNOTATIONS_SYNCED, ['atag']);
assert.calledWith(fakeFrameSync.focusAnnotations, ['atag']);
assert.calledWith(fakeFrameSync.scrollToAnnotation, 'atag');
});
......
......@@ -241,7 +241,7 @@ module.exports = function WidgetController(
return;
}
var matchesSelection = tags.some(function (tag) {
return tag.tag === selectedAnnot.$$tag;
return tag === selectedAnnot.$$tag;
});
if (!matchesSelection) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment