summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/app/directives/newsitemscroll.coffee4
-rw-r--r--js/public/app.js2
-rw-r--r--templates/main.php2
3 files changed, 5 insertions, 3 deletions
diff --git a/js/app/directives/newsitemscroll.coffee b/js/app/directives/newsitemscroll.coffee
index 5d8345999..f0cf69543 100644
--- a/js/app/directives/newsitemscroll.coffee
+++ b/js/app/directives/newsitemscroll.coffee
@@ -37,7 +37,9 @@ angular.module('News').directive 'newsItemScroll', ['$rootScope', 'Config',
scrolling = true
, Config.ScrollTimeout
- if markingRead
+ # dont scroll if the value is set to false or there is already
+ # a mark read request
+ if markingRead and elm.attr('news-item-scroll') == 'true'
markingRead = false
setTimeout ->
markingRead = true
diff --git a/js/public/app.js b/js/public/app.js
index c345d54d5..680a411ad 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -285,7 +285,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
setTimeout(function() {
return scrolling = true;
}, Config.ScrollTimeout);
- if (markingRead) {
+ if (markingRead && elm.attr('news-item-scroll') === 'true') {
markingRead = false;
setTimeout(function() {
var $elems, feedItem, id, offset, _i, _len, _results;
diff --git a/templates/main.php b/templates/main.php
index 22a7fec5d..35c8e31a5 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -49,7 +49,7 @@
autopaging: isAutoPaging()
}"
ng-controller="ItemController"
- news-item-scroll
+ news-item-scroll="true"
item-shortcuts
tabindex="-1">
<?php print_unescaped($this->inc("part.items")); ?>