diff --git a/article_maker.cc b/article_maker.cc index abe8de78..0f57d839 100644 --- a/article_maker.cc +++ b/article_maker.cc @@ -213,6 +213,7 @@ std::string ArticleMaker::makeHtmlHeader( QString const & word, "el=document.getElementById( gdCurrentArticle ); el.className = el.className.replace(' gdactivearticle','');" "el=document.getElementById( 'gdfrom-' + newId ); el.className = el.className + ' gdactivearticle';" "gdCurrentArticle = 'gdfrom-' + newId; gdAudioLinks.current = newId;" + "articleview.onJsActiveArticleChanged(gdCurrentArticle); } }" " } }" "var overIframeId = null;" "function gdSelectArticle( id ) {" @@ -657,6 +658,11 @@ void ArticleRequest::bodyFinished() if ( closePrevSpan ) { head += "
"; + } else { + // This is the first article + head += ""; } bool collapse = false; diff --git a/articleview.cc b/articleview.cc index 0dc73f64..a1f6db98 100644 --- a/articleview.cc +++ b/articleview.cc @@ -689,11 +689,7 @@ void ArticleView::setCurrentArticle( QString const & id, bool moveToIt ) if(moveToIt){ QString script=QString(" var elem=document.getElementById('%1'); if(elem!=undefined){elem.scrollIntoView(true);}").arg(id); - ui.definition->page()->runJavaScript(script); - - onJsActiveArticleChanged(id); - ui.definition->setProperty("currentArticle",id); } }