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
If I understand correctly the idea was to resize to main container once the transition for the sidebar resize is done.
The transitionend event is triggered for whatever transition we've in the main container, so for example when we're searching a word in the pdf, the event is triggered (because of the spinner).
I'd be in favor to remove this listener because it doesn't make sense to trigger a resize for whatever transition and we should figure out how to resize correctly the main container without such an event.
If I understand correctly the idea was to resize to main container once the transition for the sidebar resize is done.
Yes, it's intended to trigger rendering in the viewer (for the "named" zoom value) when the sidebar has been opened/closed.
We obviously need to keep that working, and another possibility would be to use an already existing ResizeObserver to trigger re-rendering. However, the only annoying thing would be that the ResizeObserver also fires while the sidebar is opening/closing and we really don't want to trigger re-rendering for all those "intermediate" events. We could perhaps use a timeout to avoid triggering re-sizing until things have settled down; I'll try to do some experiments later this week.
The transitionend event is triggered for whatever transition we've in the main container, so for example when we're searching a word in the pdf, the event is triggered (because of the spinner).
Using the latest Nightly version, on Windows 11, I cannot actually reproduce this; maybe it's different on other OSes?
Yes Emilio fixed the bug so it isn't a concern anymore.
But, for me at least, the bug highlights this use of transitionend and I think we shouldn't use it, so it's why I filed this issue.
The bug described in https://bugzilla.mozilla.org/show_bug.cgi?id=1866773 is because at some point a blur event is triggered by:
pdf.js/web/app.js
Lines 687 to 695 in 4bf7ff2
This code has been added a while back:
#1614
If I understand correctly the idea was to resize to main container once the transition for the sidebar resize is done.
The transitionend event is triggered for whatever transition we've in the main container, so for example when we're searching a word in the pdf, the event is triggered (because of the spinner).
I'd be in favor to remove this listener because it doesn't make sense to trigger a resize for whatever transition and we should figure out how to resize correctly the main container without such an event.
@Snuffleupagus, any ideas, opinions ?
The text was updated successfully, but these errors were encountered: