fix: fix rendering order bug in Firefox for Android (#1752)
This commit is contained in:
parent
0ce47f0379
commit
4ad7de8e8d
|
@ -24,11 +24,13 @@
|
||||||
const priorityQueue = createPriorityQueue()
|
const priorityQueue = createPriorityQueue()
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async oncreate () {
|
oncreate () {
|
||||||
const { makeProps, key, index } = this.get()
|
const { makeProps, key, index } = this.get()
|
||||||
const { reduceMotion } = this.store.get()
|
const { reduceMotion } = this.store.get()
|
||||||
if (makeProps) {
|
if (makeProps) {
|
||||||
await priorityQueue(index)
|
// TODO: I would use async/await here, but Firefox 68 for Android has a bug where
|
||||||
|
// these don't resolve in the proper order unless I use promises
|
||||||
|
priorityQueue(index).then(async () => {
|
||||||
const props = await makeProps(key)
|
const props = await makeProps(key)
|
||||||
const setProps = () => {
|
const setProps = () => {
|
||||||
mark('VirtualListLazyItem set props')
|
mark('VirtualListLazyItem set props')
|
||||||
|
@ -45,6 +47,7 @@
|
||||||
} else {
|
} else {
|
||||||
scheduleIdleTask(setProps)
|
scheduleIdleTask(setProps)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
|
|
Loading…
Reference in a new issue