]> git.wh0rd.org Git - tt-rss.git/commitdiff
cdmClicked: do not use event.target.parents to figure out if clicked on a heading
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Mon, 6 Mar 2017 09:19:13 +0000 (12:19 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Mon, 6 Mar 2017 09:19:13 +0000 (12:19 +0300)
classes/feeds.php
js/viewfeed.js

index 5c7e8a18f18b7d7e97976a3bc2cf84723cfc8086..014c5e364a574bb622d61fd09a656bbe0dc0bd34 100755 (executable)
@@ -666,7 +666,7 @@ class Feeds extends Handler_Protected {
                                        $reply['content'] .= "</div>";
 
                                        $reply['content'] .= "<div class=\"cdmContent\" $content_hidden
-                                               onclick=\"return cdmClicked(event, $id);\"
+                                               onclick=\"return cdmClicked(event, $id, true);\"
                                                id=\"CICD-$id\">";
 
                                        $reply['content'] .= "<div id=\"POSTNOTE-$id\">";
index abf56c185f5238b0919aa146d42311152cb0c954..7cbcc08b6f52ce382cb1d75de7737475915226de 100755 (executable)
@@ -1479,7 +1479,7 @@ function show_labels_in_headlines(transport) {
        }
 }
 
-function cdmClicked(event, id) {
+function cdmClicked(event, id, in_body) {
        //var shift_key = event.shiftKey;
 
        if (!event.ctrlKey && !event.metaKey) {
@@ -1521,7 +1521,7 @@ function cdmClicked(event, id) {
                        return !event.shiftKey;
                }
 
-       } else if (event.target.parents(".cdmHeader").length > 0) {
+       } else if (!in_body) {
 
                toggleSelected(id, true);
 
@@ -1535,6 +1535,8 @@ function cdmClicked(event, id) {
                toggleUnread(id, 0, false);
 
                openArticleInNewWindow(id);
+       } else {
+               return true;
        }
 
        var unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length