Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85830360
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/composables/useScrollPosition.js b/src/composables/useScrollPosition.js
index f1d6356d99..6a5e43b182 100644
--- a/src/composables/useScrollPosition.js
+++ b/src/composables/useScrollPosition.js
@@ -1,34 +1,34 @@
import { onMounted, onUnmounted, ref } from 'vue'
export function useScrollPosition() {
const x = ref(0)
const y = ref(0)
const inProgress = ref(false)
const update = (e) => {
x.value = window.scrollX
y.value = window.scrollY
}
onMounted(() => {
window.addEventListener('scroll', update)
update()
})
onUnmounted(() => {
window.removeEventListener('scroll', update)
})
const scrollBy = async (x1, y1, options) => {
inProgress.value = true
await window.scrollBy(x1, y1, options)
inProgress.value = false
}
const scrollIntoView = async (element, options) => {
inProgress.value = true
- await element.scrollIntoView(options)
+ await element.scrollIntoViewIfNeeded(options)
inProgress.value = false
}
return { x, y, scrollBy, scrollIntoView, inProgress }
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Nov 1, 3:54 AM (17 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1802387
Default Alt Text
(1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline