Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client sometimes doesn't re-layout on browser window size change #87

Open
ceisserer opened this issue Nov 25, 2022 · 4 comments
Open

Client sometimes doesn't re-layout on browser window size change #87

ceisserer opened this issue Nov 25, 2022 · 4 comments
Labels
bug Something isn't working question Further information is requested

Comments

@ceisserer
Copy link
Contributor

ceisserer commented Nov 25, 2022

I've observed this issue for a few years now back when I started to work with RAP-3.1 and it still is present in RAP-3.22. From time to time and for no appearant reason clients stop responding to browser-resize events, while everything else continues to work just fine.

Typically when resizing the browser window, the client accumulates changes and periodically pushes those values to the server (setBounds, notifyResize). At first I had doubts whether this could be an issue with application-code (some resize-listeners missing), but than I noticed even a minimal example with only an empty entrypoint causes those setbounds/notify-messages to be sent over.
For a client in degenerated state however, no network messages are sent to the server on resize - and while other events/etc work just fine, also other events don't cause a resize (so this rules out those resize-messages are just stuck somewhere and don't cause a flush).

I tried to debug the issue further, but now I am a bit stuck:

  • in _dispatchEvent (Internal event dispatch method), I see evt._valueType with "windowresize", so the browser seems to trigger the event:

window_resize

  • and later recompute also detects the width changes:

recompute

after which it flushes the GlobalQueues. but no network request is issued by this.

In contrast, on a working client I get additional related events after a browser resize, like the changeWidth event shzown in the screenshot below. This changewidth-event is completly missing in the dysfunctional state:
works

I would be really grateful for hints where to debug / search further. The fact that this seems to happen seldom and quite random makes it hard to dig deeper...

Update: I wasn't sure whether this happens only on Firefox, but in a ticket from 2019 I just found the note "mostly happens when using google chrome". so the issue doesn't seem to be browser-specific.

@ifurnadjiev
Copy link
Contributor

ifurnadjiev commented Nov 25, 2022

Hi Clemens,

the code you are looking for is in Shell.js. The "windowresize" event is attached in "_applyMode" function when the mode is "maximized". Then in onWindowResize we send the bounds of the Shell to the server.

I hope that with these pointers you can debug what's the problem.

@ceisserer
Copy link
Contributor Author

indeed, thanks a lot.

in broken state, _onWindowResize is not called - the sendBoundsTimer is inactive and all flags are false (sendmMve, sendResizeDelayed, sendResize). So maybe the listener hasn't been attached, I'll dig further...

@mknauer mknauer added bug Something isn't working question Further information is requested labels Nov 30, 2022
@ifurnadjiev
Copy link
Contributor

@ceisserer Any additional insides here?

@ceisserer
Copy link
Contributor Author

Unfortunatly I had to pause investigating this issue, hopefully I'll soon have more time to finally get to the root of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants