Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
8.7
Detailed description of issue
How can I disable the header from showing while the viewer is loading? It seems that once the instance is loaded, calling UI.disableElements(['header', 'toolsHeader']); will hide the header bit it will briefly show or “flash” when the viewer is initially loaded or the view is rotated.
Does your issue happen with every document, or just one?
It happens with or without documents
@tgordon Introducing the disabledElements variable returns a couple errors and prevents the viewer from loading:
react-dom.production.min.js:216 TypeError: Cannot read properties of null (reading ‘style’)
at y (DocumentCropPopupContainer.js:55:28)
at DocumentCropPopupContainer.js:66:7
at Ms (react-dom.production.min.js:262:359)
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vo (react-dom.production.min.js:122:325)
at Ts (react-dom.production.min.js:261:308)
at ds (react-dom.production.min.js:243:50)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vo (react-dom.production.min.js:122:325)
il @ react-dom.production.min.js:216
n.callback @ react-dom.production.min.js:216
ci @ react-dom.production.min.js:131
dl @ react-dom.production.min.js:220
As @ react-dom.production.min.js:259
t.unstable_runWithPriority @ scheduler.production.min.js:18
Vo @ react-dom.production.min.js:122
Os @ react-dom.production.min.js:252
ds @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
Vo @ react-dom.production.min.js:122
Wo @ react-dom.production.min.js:123
Go @ react-dom.production.min.js:122
hs @ react-dom.production.min.js:244
Js @ react-dom.production.min.js:289
t.render @ react-dom.production.min.js:296
(anonymous) @ index.js:201
Promise.then (async)
(anonymous) @ index.js:184
o @ bootstrap:63
(anonymous) @ bootstrap:198
(anonymous) @ webviewer-ui.min.js:1
DocumentCropPopupContainer.js:55 Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘style’)
at y (DocumentCropPopupContainer.js:55:28)
at DocumentCropPopupContainer.js:66:7
at Ms (react-dom.production.min.js:262:359)
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vo (react-dom.production.min.js:122:325)
at Ts (react-dom.production.min.js:261:308)
at ds (react-dom.production.min.js:243:50)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Vo (react-dom.production.min.js:122:325)