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
{{ message }}
Repository navigation
Navigation problem when ClickShortcut is present in LegacyWrapper #115
Navigation seems to break when trying to navigate to a Flow View containing a LegacyWrapper of a Vaadin 7 component. The issue seems to be caused when adding a ClickShortcut to a Vaadin 7 Button that is inside a Legacy Wrapper in a Vaadin Flow View. If I remove that ClickShortcut, the navigation works okay. See attached image of the problem:
Why going root -> Button or navigate -> Button does not brake the location? Because:
Framework UI is being lazely loaded when opening view with v7 component
Current location is stored in v7 Page object
Two UIDL updates are returned, one for Flow (no dirty v7 components for state update yet) and one after Framework initialization
And why going back and forth is breaking location:
Adding clickShortcut is causing MprUI to be marked as dirty
Dirty visible components state is added to UIDL to force component repaint
MprUI state contains location from Page instance (see point 2 from list above)
Vaadin 23 UidlRequestHandler.removeOffendingMprHashFragment is looking for location and forces unnecessary history state push (with previously stored improper location) - (introduced in fix path when full location is provided flow#7693)
The navigation works well if the server-side bootstrapping is turned on through the parameter vaadin.useDeprecatedV14Bootstrapping=true in application.properties. In server-side bootstrapping mode the fragment manipulations are disabled. This can be used as a workaround until the issue is fixed.
Looking for guidance on when the next hotfix release will be that will include this, or the best way to incorporate this just this fix into our build, as we need to get our software released very soon and are looking for the path that gives us the least resistance here.
@Tostino which version of Vaadin do you use? Is it V23.1.x ? Since the fix is on the Flow side, I can release the corresponding version of Flow with this patch tomorrow morning and you can override it in your project. Platform release comes later on according to a normal schedule, so once it's ready you would remove the override and just upgrade the platform version. Does it sound fine for you?
Activity
MarcinVaadin commentedon Aug 5, 2022
Investigation results:
Why going root -> Button or navigate -> Button does not brake the location? Because:
PageobjectAnd why going back and forth is breaking location:
MprUIto be marked as dirtyMprUIstate containslocationfromPageinstance (see point 2 from list above)UidlRequestHandler.removeOffendingMprHashFragmentis looking forlocationand forces unnecessary history state push (with previously stored improper location) - (introduced in fix path when full location is provided flow#7693)mshabarov commentedon Aug 16, 2022
Indeed, this is a regression after applying a patch for fixing vaadin/flow#7540 .
UidlRequestHandler::removeOffendingMprHashFragmentadds an extrahttp://localhost:8080to the history, through this method:https://github.com/vaadin/flow/blob/020ee677e59d3b0f411232e402c55a68f34924f2/flow-server/src/main/java/com/vaadin/flow/server/communication/UidlRequestHandler.java#L309
The navigation works well if the server-side bootstrapping is turned on through the parameter
vaadin.useDeprecatedV14Bootstrapping=trueinapplication.properties. In server-side bootstrapping mode the fragment manipulations are disabled. This can be used as a workaround until the issue is fixed.kshashov commentedon Aug 16, 2022
We tried turning

useDeprecatedV14Bootstrappingon but the issue was still reproducible in a slightly different waymshabarov commentedon Aug 17, 2022
@kshashov thanks, indeed, this also doesn't fix the problem. Looks like a completely different issue in Flow vaadin/flow#14323 .
fix: Not modify browser history if location has no hash (#14397)
fix: Not modify browser history if location has no hash (#14397)
fix: Not modify browser history if location has no hash (#14397)
fix: Not modify browser history if location has no hash (#14397)
fix: Not modify browser history if location has no hash (#14397) (#14404
fix: Not modify browser history if location has no hash (#14397) (#14405
fix: Not modify browser history if location has no hash (#14397) (#14406
Tostino commentedon Aug 22, 2022
Looking for guidance on when the next hotfix release will be that will include this, or the best way to incorporate this just this fix into our build, as we need to get our software released very soon and are looking for the path that gives us the least resistance here.
mshabarov commentedon Aug 22, 2022
@Tostino which version of Vaadin do you use? Is it V23.1.x ? Since the fix is on the Flow side, I can release the corresponding version of Flow with this patch tomorrow morning and you can override it in your project. Platform release comes later on according to a normal schedule, so once it's ready you would remove the override and just upgrade the platform version. Does it sound fine for you?
Tostino commentedon Aug 22, 2022
We made the original report, so we are on 23.1.3 right now. That seems like it'll work just fine, we can just upgrade the flow version.
Thanks for the help here.
mshabarov commentedon Aug 23, 2022
@Tostino please try a new Flow 23.1.6 with this patch:
Will be included into next 23.1.x platform release.
vaadin-bot commentedon Sep 9, 2022
This ticket/PR has been released with Vaadin 23.1.8.