mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
fix:scrollIntoView,set the html active style.
This commit is contained in:
parent
f146177232
commit
d341a64569
|
@ -677,8 +677,10 @@ void ArticleView::setCurrentArticle( QString const & id, bool moveToIt )
|
||||||
QString script=QString(" var elem=document.getElementById('%1'); if(elem!=undefined){elem.scrollIntoView(true);}").arg(id);
|
QString script=QString(" var elem=document.getElementById('%1'); if(elem!=undefined){elem.scrollIntoView(true);}").arg(id);
|
||||||
onJsActiveArticleChanged(id);
|
onJsActiveArticleChanged(id);
|
||||||
ui.definition->page()->runJavaScript(script);
|
ui.definition->page()->runJavaScript(script);
|
||||||
ui.definition->setProperty("currentArticle",id);
|
QString dictId = id.mid( 7 );
|
||||||
setActiveArticleId(id.mid(7));
|
setActiveArticleId( dictId );
|
||||||
|
|
||||||
|
ui.definition->page()->runJavaScript( QString( "gdMakeArticleActive(%1);" ).arg( dictId ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue