hotkey actions: toggle_expand, collapse_article: check if element exists
before acting on it (closes #815)
This commit is contained in:
parent
110ce72a72
commit
98cbae8dfa
1 changed files with 16 additions and 10 deletions
26
js/tt-rss.js
26
js/tt-rss.js
|
@ -302,21 +302,27 @@ function init() {
|
|||
hotkey_actions["collapse_article"] = function() {
|
||||
var id = getActiveArticleId();
|
||||
var elem = $("CICD-"+id);
|
||||
if(elem.visible()) {
|
||||
cdmCollapseArticle(null, id);
|
||||
}
|
||||
else {
|
||||
cdmExpandArticle(id);
|
||||
|
||||
if (elem) {
|
||||
if (elem.visible()) {
|
||||
cdmCollapseArticle(null, id);
|
||||
}
|
||||
else {
|
||||
cdmExpandArticle(id);
|
||||
}
|
||||
}
|
||||
};
|
||||
hotkey_actions["toggle_expand"] = function() {
|
||||
var id = getActiveArticleId();
|
||||
var elem = $("CICD-"+id);
|
||||
if(elem.visible()) {
|
||||
cdmCollapseArticle(null, id, false);
|
||||
}
|
||||
else {
|
||||
cdmExpandArticle(id);
|
||||
|
||||
if (elem) {
|
||||
if (elem.visible()) {
|
||||
cdmCollapseArticle(null, id, false);
|
||||
}
|
||||
else {
|
||||
cdmExpandArticle(id);
|
||||
}
|
||||
}
|
||||
};
|
||||
hotkey_actions["search_dialog"] = function() {
|
||||
|
|
Loading…
Reference in a new issue