You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an edge case pretty hard to reproduce.
When window.resize event is triggered while book.renderTo( is ongoing, the reader display a blank page with an empty div :
After long hours of exploration, I found that resize event empty the list of views in the manager.
Then, onResized get called in Rendition and should call display but it doesn't, because the location is not set already :
/** * Report resize events and display the last seen location * @private */onResized(size,epubcfi){/** * Emit that the rendition has been resized * @event resized * @param {number} width * @param {height} height * @param {string} epubcfi (optional) * @memberof Rendition */this.emit(EVENTS.RENDITION.RESIZED,{width: size.width,height: size.height},epubcfi)if(this.location&&this.location.start){this.display(epubcfi||this.location.start.cfi)}}
I met two use cases. In the first one, the promise display was pending and in the second one, the promise display was completed.
I will try to propose a pull request soon.
The text was updated successfully, but these errors were encountered:
vince4
changed the title
Blank page when resize happen during loading
[Bug] Blank page when resize happen during loading
May 10, 2024
I found an edge case pretty hard to reproduce.
When window.resize event is triggered while
book.renderTo(
is ongoing, the reader display a blank page with an empty div :After long hours of exploration, I found that
resize
event empty the list of views in the manager.Then,
onResized
get called inRendition
and should calldisplay
but it doesn't, because the location is not set already :I met two use cases. In the first one, the promise display was pending and in the second one, the promise display was completed.
I will try to propose a pull request soon.
The text was updated successfully, but these errors were encountered: