The present implementation of {{Coord}} generates two <div> sections containing geo-data, inserted into the DOM tree consecutively. The second one is moved with absolute/fixed positioning to the top-right. When the containing element is then set display:none; , this results in the hiding geo data and mini-map in the top-right. A minimal test-case can be seen at:
- https://en.wikipedia.org/wiki/Template_talk:Coord/collapse_testcase
- https://en.wikipedia.org/wiki/Template_talk:Coord#display.3Dtitle_bug
A solution would appear to be to insert the second geo snippet at the top-level of the DOM tree, therefore being immune to collapsing. This will require the availability of a hook, variable, or callback to allow later insertion. Ideally Mediawiki should allow a mechanism to facilitate the required out-of-hierarchy/delayed insertion.