mirror of https://github.com/status-im/codimd.git
fix: avoid insert embed tag on the main thread which cause Safari on Big Sur freezing
upgrade pdfobject to version 2.2.4 Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
parent
dd16949222
commit
a1e3768f98
|
@ -12440,9 +12440,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pdfobject": {
|
"pdfobject": {
|
||||||
"version": "2.1.1",
|
"version": "2.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/pdfobject/-/pdfobject-2.2.4.tgz",
|
||||||
"integrity": "sha512-QFktTHyjs4q/WhGFfV2RdAbscPdNkyQb/JfFz18cwILvs9ocDiYVFAEh/jgkKGv6my+r4nlbLjwj7BHFKAupHQ==",
|
"integrity": "sha512-r6Rw9CQWsrY6uqmKvlgFNoupmuRbSt9EsG0sZhSAy3cIk4WgOXyAVmebFSlLhqj6gA5NIEXL3lSEbwOOYfdUvw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pend": {
|
"pend": {
|
||||||
|
|
|
@ -173,7 +173,7 @@
|
||||||
"nyc": "~14.0.0",
|
"nyc": "~14.0.0",
|
||||||
"optimize-css-assets-webpack-plugin": "~5.0.0",
|
"optimize-css-assets-webpack-plugin": "~5.0.0",
|
||||||
"papaparse": "^5.2.0",
|
"papaparse": "^5.2.0",
|
||||||
"pdfobject": "~2.1.1",
|
"pdfobject": "~2.2.4",
|
||||||
"plantuml-encoder": "^1.2.5",
|
"plantuml-encoder": "^1.2.5",
|
||||||
"power-assert": "~1.6.1",
|
"power-assert": "~1.6.1",
|
||||||
"prismjs": "^1.17.1",
|
"prismjs": "^1.17.1",
|
||||||
|
|
|
@ -597,9 +597,11 @@ export function finishView (view) {
|
||||||
const url = $(value).attr('data-pdfurl')
|
const url = $(value).attr('data-pdfurl')
|
||||||
const inner = $('<div></div>')
|
const inner = $('<div></div>')
|
||||||
$(this).append(inner)
|
$(this).append(inner)
|
||||||
PDFObject.embed(url, inner, {
|
setTimeout(() => {
|
||||||
height: '400px'
|
PDFObject.embed(url, inner, {
|
||||||
})
|
height: '400px'
|
||||||
|
})
|
||||||
|
}, 1)
|
||||||
})
|
})
|
||||||
// syntax highlighting
|
// syntax highlighting
|
||||||
view.find('code.raw').removeClass('raw')
|
view.find('code.raw').removeClass('raw')
|
||||||
|
|
Loading…
Reference in New Issue