Closed silvan-lincan closed 1 year ago
Seems related to this section in flow, transferring to flow repository https://github.com/vaadin/flow/blob/30886fd96c0cfdb8cc7d8546972666528126fddb/flow-dnd/src/main/java/com/vaadin/flow/component/dnd/internal/DndUtil.java#L97-L127
Hi @alvarezguille
Thank you.
Hello,
just a proposal, I don't know if this is really Ok, but looks like it solves the issue.
I tried this with flow-2.7.4.
In com.vaadin.flow.server.ServiceContextUriResolver#resolveVaadinUri
I did the following modification:
instead of:
return super.resolveVaadinUri(uri, frontendUrl, "/");
I tried with:
String context = VaadinService.getCurrentRequest().getContextPath();
if (!"/".equals(context)) {
context = context.concat("/");
}
return super.resolveVaadinUri(uri, frontendUrl, context);
And then everything works as expected, the resulting url is:
/dnd/webjars/mobile-drag-drop/2.3.0-rc.1/index.min.js
instead of previously:
/webjars/mobile-drag-drop/2.3.0-rc.1/index.min.js
Maybe it helps. Thank you.
Wow, this has been open for some time... It will be fixed by #16477
Description
In a Drag and Drop enabled Grid, using Grid#setRowsDraggable(true):
Expected outcome
Drag and Drop among the Grid rows should work both on Desktop and Mobile, not matter if the application is deployed in the Root context or a different one.
Actual outcome
Drag and Drop is not working on a mobile device, when the application is deployed on a different context than Root and if tails with the following error:
Minimal reproducible example
The issue can be reproduced from a Vaadin 14.7.4 starter. Please see archive attached: vaadin14-dnd-mobile.zip
Steps to reproduce
Environment
Notes
Please let me know if you need additional info Thank you.