mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 12:01:15 -04:00
Small fix on hyperlinks inside an article, so that the content does not "scroll" by one line at the moment you click
This commit is contained in:
parent
3f8162e377
commit
796d67880d
@ -185,7 +185,6 @@ define(function(require) {
|
|||||||
/**
|
/**
|
||||||
* Handle key input in the prefix input zone
|
* Handle key input in the prefix input zone
|
||||||
* @param {type} evt
|
* @param {type} evt
|
||||||
* @returns {undefined}
|
|
||||||
*/
|
*/
|
||||||
function onKeyUpPrefix(evt) {
|
function onKeyUpPrefix(evt) {
|
||||||
// Use a timeout, so that very quick typing does not cause a lot of overhead
|
// Use a timeout, so that very quick typing does not cause a lot of overhead
|
||||||
@ -398,14 +397,14 @@ define(function(require) {
|
|||||||
* @returns {undefined}
|
* @returns {undefined}
|
||||||
*/
|
*/
|
||||||
function goToArticle(titleName) {
|
function goToArticle(titleName) {
|
||||||
$("#articleName").html(titleName);
|
|
||||||
$("#readingArticle").show();
|
|
||||||
localArchive.getTitleByName(titleName, function(title) {
|
localArchive.getTitleByName(titleName, function(title) {
|
||||||
if (title == null) {
|
if (title === null || title === undefined) {
|
||||||
$("#readingArticle").hide();
|
$("#readingArticle").hide();
|
||||||
alert("Article with title " + titleName + " not found in the archive");
|
alert("Article with title " + titleName + " not found in the archive");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$("#articleName").html(titleName);
|
||||||
|
$("#readingArticle").show();
|
||||||
$("#articleContent").html("");
|
$("#articleContent").html("");
|
||||||
readArticle(title);
|
readArticle(title);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user