Fix scrolling through the download dropdown (#2426)
* Fix scrolling through the download dropdown * Fix lining issue
This commit is contained in:
parent
34bbba55da
commit
01cfbe7b1e
|
@ -300,6 +300,18 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.$watch('$refs.downloadButton.dropdownShown', (dropdownShown) => {
|
||||||
|
this.$parent.infoAreaSticky = !dropdownShown
|
||||||
|
|
||||||
|
if (dropdownShown && window.innerWidth >= 901) {
|
||||||
|
// adds a slight delay so we know that the dropdown has shown up
|
||||||
|
// and won't mess up our scrolling
|
||||||
|
Promise.resolve().then(() => {
|
||||||
|
this.$parent.$refs.infoArea.scrollIntoView()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
/>
|
/>
|
||||||
<ft-icon-button
|
<ft-icon-button
|
||||||
v-if="!isUpcoming && downloadLinks.length > 0"
|
v-if="!isUpcoming && downloadLinks.length > 0"
|
||||||
|
ref="downloadButton"
|
||||||
:title="$t('Video.Download Video')"
|
:title="$t('Video.Download Video')"
|
||||||
class="option"
|
class="option"
|
||||||
theme="secondary"
|
theme="secondary"
|
||||||
|
|
|
@ -79,7 +79,8 @@ export default Vue.extend({
|
||||||
timestamp: null,
|
timestamp: null,
|
||||||
playNextTimeout: null,
|
playNextTimeout: null,
|
||||||
playNextCountDownIntervalId: null,
|
playNextCountDownIntervalId: null,
|
||||||
pictureInPictureButtonInverval: null
|
pictureInPictureButtonInverval: null,
|
||||||
|
infoAreaSticky: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -74,7 +74,11 @@
|
||||||
grid-area: info
|
grid-area: info
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
@media only screen and (min-width: 901px)
|
@media only screen and (min-width: 901px)
|
||||||
|
.infoArea
|
||||||
|
scroll-margin-top: 76px
|
||||||
|
|
||||||
|
.infoAreaSticky
|
||||||
position: sticky
|
position: sticky
|
||||||
top: 76px
|
top: 76px
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,9 @@
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="(isFamilyFriendly || !showFamilyFriendlyOnly)"
|
v-if="(isFamilyFriendly || !showFamilyFriendlyOnly)"
|
||||||
|
ref="infoArea"
|
||||||
class="infoArea"
|
class="infoArea"
|
||||||
|
:class="{ infoAreaSticky }"
|
||||||
>
|
>
|
||||||
<watch-video-info
|
<watch-video-info
|
||||||
v-if="!isLoading"
|
v-if="!isLoading"
|
||||||
|
|
Loading…
Reference in New Issue