Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/renderer/components/watch-video-info/watch-video-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
/>
<ft-icon-button
v-if="!isUpcoming && downloadLinks.length > 0"
ref="downloadButton"
:title="$t('Video.Download Video')"
class="option"
theme="secondary"
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export default Vue.extend({
timestamp: null,
playNextTimeout: null,
playNextCountDownIntervalId: null,
pictureInPictureButtonInverval: null
pictureInPictureButtonInverval: null,
infoAreaSticky: true
}
},
computed: {
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/views/Watch/Watch.sass
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
grid-area: info
position: relative

@media only screen and (min-width: 901px)
@media only screen and (min-width: 901px)
.infoArea
scroll-margin-top: 76px

.infoAreaSticky
position: sticky
top: 76px

Expand Down
6 changes: 5 additions & 1 deletion src/renderer/views/Watch/Watch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@
</div>
</div>
</div>
<div class="infoArea">
<div
ref="infoArea"
class="infoArea"
:class="{ infoAreaSticky }"
>
<watch-video-info
v-if="!isLoading"
:id="videoId"
Expand Down