From 02b517bf85577e0b7831ce6b09de87a58b531932 Mon Sep 17 00:00:00 2001 From: Manuel Sailer Date: Tue, 18 Apr 2023 12:15:57 +0200 Subject: Fix audio player floating when scrolling (#2142) (#2206) Signed-off-by: ManuelSailer Signed-off-by: Manuel Sailer --- CHANGELOG.md | 2 +- css/content.css | 15 +++++++++++++++ js/directive/NewsStickyMenu.js | 6 ++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b32dafeef..bfbd260f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ The format is mostly based on [Keep a Changelog](https://keepachangelog.com/en/1 ### Changed ### Fixed +- Fix audio player floating when scrolling in NC25+ (#2142) - Fix sorting of folder names in select when adding subscription (#2090) - # Releases ## [21.2.0-beta3] - 2023-04-16 ### Changed diff --git a/css/content.css b/css/content.css index 52fa87da9..37abf5fe5 100644 --- a/css/content.css +++ b/css/content.css @@ -66,6 +66,10 @@ align-items: center; } +#app-content.nc-major-version-gte-25 .podcast { + top: 0; +} + #app-content .podcast audio { display: block; width: calc(100% - 60px); @@ -108,6 +112,17 @@ left: 0; } +#app-content.nc-major-version-gte-25 .podcast { + position: sticky; +} + +@media only screen and (width < 1024px) { + #app-content.nc-major-version-gte-25 .podcast { + left: 35px; + width: calc(100% - 35px); + } +} + #notification a { text-decoration: underline; color: blue; diff --git a/js/directive/NewsStickyMenu.js b/js/directive/NewsStickyMenu.js index b46500577..7da681214 100644 --- a/js/directive/NewsStickyMenu.js +++ b/js/directive/NewsStickyMenu.js @@ -7,7 +7,7 @@ * @author Bernhard Posselt * @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'); } -- cgit v1.2.3