summaryrefslogtreecommitdiffstats
path: root/js-old
diff options
context:
space:
mode:
Diffstat (limited to 'js-old')
-rw-r--r--js-old/directive/NewsStickyMenu.js6
-rw-r--r--js-old/gui/KeyboardShortcuts.js2
2 files changed, 5 insertions, 3 deletions
diff --git a/js-old/directive/NewsStickyMenu.js b/js-old/directive/NewsStickyMenu.js
index b46500577..7da681214 100644
--- a/js-old/directive/NewsStickyMenu.js
+++ b/js-old/directive/NewsStickyMenu.js
@@ -7,7 +7,7 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
-app.directive('newsStickyMenu', function () {
+app.directive('newsStickyMenu', function (NC_MAJOR_VERSION) {
'use strict';
return function (scope, elem, attr) {
@@ -18,7 +18,9 @@ app.directive('newsStickyMenu', function () {
if (scrollHeight > height) {
elem.addClass('fixed');
- elem.css('top', scrollHeight);
+ if (NC_MAJOR_VERSION < 25) {
+ elem.css('top', scrollHeight);
+ }
} else {
elem.removeClass('fixed');
}
diff --git a/js-old/gui/KeyboardShortcuts.js b/js-old/gui/KeyboardShortcuts.js
index 9ddcb582d..3cb174e00 100644
--- a/js-old/gui/KeyboardShortcuts.js
+++ b/js-old/gui/KeyboardShortcuts.js
@@ -259,10 +259,10 @@
var openLink = function () {
onActiveItem(function (item) {
- item.trigger('click'); // mark read
var url = item.find('.external:visible').attr('href');
var newWindow = window.open(url, '_blank');
newWindow.opener = null;
+ setTimeout(()=>item.trigger('click'), 0); // mark read
});
};