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
UI dirty after changes are written on the response causes push invocation #14887
Comments
Observations from @Legioth
|
When UidlWriter collects changes to send to the client it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887 Co-authored-by: Marco Collovati <marco@vaadin.com>
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
When UidlWriter collects changes to send to the client, it may happen that UI is still dirty because features may enqueue additional changes. As a side effect, if UI is still dirty after UIDL response is written, a useless PUSH action is performed. This change performs changes collection until the UI is no more dirty. Fixes #14887
This ticket/PR has been released with Vaadin 14.9.4. |
This ticket/PR has been released with Vaadin 22.0.26. |
This ticket/PR has been released with Vaadin 23.2.12. |
This ticket/PR has been released with Vaadin 23.3.2. |
This ticket/PR has been released with Vaadin 24.0.0.alpha7 and is also targeting the upcoming stable 24.0.0 version. |
Description of the bug
It seems like that in some situations after
UidlRequestHandler
has written the changes on the response, the UI is still considered dirty, causingpush
to be invoked whenVaadinSession
is unlocked.For example, when opening a Vaadin application on the browser, there's a first UIDL request from the client that is processed and written to the response (
UidlRequestHandler.synchronizedHandleRequest -> commitJsonResponse
) and the client issues a new UIDL request, that is pending.The first request continues with the UI still dirty (
UIInternals.isDirty()
) andpush()
is invokedThe push message contains no changes, and it is processed by the client.
After that, the pending request continues, but this time after
UidlRequestHandler
processing the UI is not dirty (perhaps because there are no changes).The same happens for example also when pressing a button with a server-side listener:
UIDL req -> response written -> UI still dirty -> push
In the following screenshot you can see the UIDL request, the push message without changes and the second UIDL request.
Expected behavior
After a UIDL request is processed, the UI should not be dirty and no PUSH messages are sent to the client.
Minimal reproducible example
UidlRequestHandler.synchronizedHandleRequest
, aftercommitJsonResponse()
uI.getInternals().isDirty()
)Versions
The text was updated successfully, but these errors were encountered: