diff --git a/static/js/annotation.js b/static/js/annotation.js index d0c9556..5fcc4e8 100644 --- a/static/js/annotation.js +++ b/static/js/annotation.js @@ -1,7 +1,7 @@ 'use strict'; oml.ui.annotation = function(annotation, $iframe) { - var $quoteText = Ox.Element() + var $quotetext = Ox.Element() .addClass('OxSelectable OMLQuote') .html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '
')) .on({ @@ -11,19 +11,18 @@ oml.ui.annotation = function(annotation, $iframe) { id: annotation.id }) } - }); - var $quoteBackground = Ox.Element().addClass('OMLQuoteBackground'); + }) var $quote = Ox.Element() .addClass('OMLQuoteBox') .append( - $quoteBackground + Ox.Element().addClass('OMLQuoteBackground') ).append( - $quoteText - ); + $quotetext + ) var notes = annotation.notes.length ? annotation.notes.map(function(note) { note.editable = !note.user return note - }) : []; + }) : [] var $notes = Ox.ArrayEditable({ editing: true, items: notes, @@ -97,7 +96,6 @@ oml.ui.annotation = function(annotation, $iframe) { selected && selected.classList.remove('selected') that.addClass('selected') that.gainFocus() - that[0].scrollIntoViewIfNeeded() } return that; };