Leaflet won't interact with mouse with nested form level

Hi,
I use leaflet + leaflet.draw, I've tried with an empty project when leaflet div container is on front part (ie main window) there has no problem to manage and interact with mouse.
But when you use sub form created from parent with many nested levels form map appears but there's no interact with mouse only dbclic.

this can be simulated with simple project.
use TWebPageControler inside one TabSheet put a THtmlDiv (used by Leaflet) same thing happens, the map appears but only dbclic is running (no drag...)

I haven't tried this with Leaflet yet, but something that has helped with this kind of thing with other JS libraries is to ensure that the ElementID property has a value in the TWebHTMLDiv component that is hosting the JS element, as well as all the parent TWebHTMLDiv, TWebTabSheet, and TWebPageControl components in the hierarchy, all the way back to the TWebForm.

Ok Andrew i've not respected the hierarchical declaration of ElementID.
I'll try it now to see if it resolve my problem.
Thanks

It looks like it's not working.

I should also have clarified that you need to be sure that the ElementID properties are all unique. Here's a test project where it didn't work perfectly without the ElementIDs, but after adding them in, things work as expected. I had to add the 'reisze' event to make sure it appeared with the right dimensions but it seems to work with panning and zooming.

LeafletTestProject.zip (10.6 KB)

Hi andrew,
I use VS your project is adapted to Delphi some properties like margins of TWebHtmlDiv does'nt mapped with VS. If I change it (remove) in dfm before start I can see your example. But in fact mine is very more complex.

I've nesteed forms and there's in last level that my problem happens. I use part of screen and not full
client Align to use Map.

See my explanation.

Explain.pdf (174,8 Ko)

Thanks

Well, the demo I sent addressed the question you posted. I haven't used VSC to know whether the same thing applies in that environment. Posting a sample project demonstrating the issue would help.

Andrew this is a project with the problem and some explanation to use it.
Thanks
explanation.pdf (149,0 Ko)
1_test.zip (1,4 Mo)