God bless Firefox v129
This commit is contained in:
@@ -95,14 +95,18 @@ const PortraitForm = (props: PortraitFormProps) => {
|
|||||||
deleteFile(fileIdRef.current)
|
deleteFile(fileIdRef.current)
|
||||||
|
|
||||||
if (navigator.userAgent.match(/firefox|fxios/i)) {
|
if (navigator.userAgent.match(/firefox|fxios/i)) {
|
||||||
// Dear Mozilla, please implement keepalive on Firefox
|
const firefoxVer = Number(navigator.userAgent.match(/Firefox\/(\d+)/)[1])
|
||||||
// Sincerely, everybody
|
|
||||||
|
// One day dom.fetchKeepalive.enabled becomes true by default... until then!
|
||||||
|
if (firefoxVer < 129) {
|
||||||
const time = Date.now()
|
const time = Date.now()
|
||||||
|
|
||||||
while (Date.now() - time < 500) {
|
while (Date.now() - time < 500) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const onUploadComplete = (
|
const onUploadComplete = (
|
||||||
result: UploadResult<Meta, Record<string, never>>
|
result: UploadResult<Meta, Record<string, never>>
|
||||||
|
|||||||
Reference in New Issue
Block a user