diff --git a/static/js/Editor.js b/static/js/Editor.js index 26ae124..22cb8f0 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -816,7 +816,7 @@ HOVER_DURATION_MILLISECONDS = 1000; Editor.prototype.mouse_hovered = function ( event ) { // ignore mouse hover events for static div notes - if ( this.div ) + if ( !this.iframe ) return; // search through the tree of elements containing the hover target for a link @@ -1181,12 +1181,12 @@ Editor.prototype.shutdown = function( event ) { } Editor.prototype.summarize = function () { - if ( this.div ) - return summarize_html( scrapeText( this.div ), this.title ); - if ( this.document && this.document.body ) return summarize_html( scrapeText( this.document.body ), this.title ); + if ( this.div ) + return summarize_html( scrapeText( this.div ), this.title ); + return ""; } diff --git a/static/js/Wiki.js b/static/js/Wiki.js index d939358..a981881 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -946,7 +946,7 @@ Wiki.prototype.display_link_pulldown = function ( editor, link, ephemeral ) { if ( !pulldown && title.length > 0 && query.note_id == "new" ) { this.clear_pulldowns(); var self = this; - var suggest_pulldown = new Suggest_pulldown( this, this.notebook.object_id, this.invoker, link, editor.holder, title, editor.document ); + var suggest_pulldown = new Suggest_pulldown( this, this.notebook.object_id, this.invoker, link, editor.iframe, title, editor.document ); connect( suggest_pulldown, "suggestion_selected", function ( note ) { self.update_link_with_suggestion( editor, link, note ) } ); @@ -3208,7 +3208,7 @@ function Link_pulldown( wiki, notebook_id, invoker, editor, link, ephemeral ) { link.pulldown = this; this.link = link; - Pulldown.call( this, wiki, notebook_id, "link_" + editor.id, link, editor.holder, ephemeral ); + Pulldown.call( this, wiki, notebook_id, "link_" + editor.id, link, editor.iframe, ephemeral ); this.invoker = invoker; this.editor = editor; @@ -3451,7 +3451,7 @@ function Upload_pulldown( wiki, notebook_id, invoker, editor, link, ephemeral ) this.link = link || editor.find_link_at_cursor(); this.link.pulldown = this; - Pulldown.call( this, wiki, notebook_id, "upload_" + editor.id, this.link, editor.holder, ephemeral ); + Pulldown.call( this, wiki, notebook_id, "upload_" + editor.id, this.link, editor.iframe, ephemeral ); wiki.down_image_button( "attachFile" ); var vaguely_random = new Date().getTime(); @@ -3750,7 +3750,7 @@ function File_link_pulldown( wiki, notebook_id, invoker, editor, link, ephemeral link.pulldown = this; this.link = link; - Pulldown.call( this, wiki, notebook_id, "file_link_" + editor.id, link, editor.holder, ephemeral ); + Pulldown.call( this, wiki, notebook_id, "file_link_" + editor.id, link, editor.iframe, ephemeral ); this.invoker = invoker; this.editor = editor;