Elements can be displayed differently with certain browsers, which is well known. Unfortunately, I don't know how to achieve the same result for different browsers using suitable CSS formulation, at least in this case:
FX
iPhone
See these nodes:
[{"id":"0fb520c25469b9bf","type":"tab","label":"Modal Test","disabled":false,"info":"","env":[]},{"id":"0adc62f254fe565a","type":"ui_text","z":"0fb520c25469b9bf","group":"db5030bb15132bad","order":1,"width":6,"height":1,"name":"Text field1","label":"Text field1","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":500,"y":220,"wires":[]},{"id":"ed9715e613652bb2","type":"ui_text","z":"0fb520c25469b9bf","group":"db5030bb15132bad","order":3,"width":6,"height":4,"name":"Text field2","label":"Text field2","format":"{{msg.payload}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":500,"y":260,"wires":[]},{"id":"491e302da4344bfa","type":"ui_template","z":"0fb520c25469b9bf","group":"db5030bb15132bad","name":"","order":2,"width":0,"height":0,"format":"<div ng-bind-html=\"msg.payload\"></div>\n\n<span>Template in the middle </span>\n\n<span id=\"myinfos\" class=\"modal\" style=\"margin-left: 220px;\">The modal section </span>\n\n<style>\n /* The Modal (background) */\n .modal {\n --mwidth: 300px;\n \n display: block; /* Hidden by default */\n position: fixed; /* Stay in place */\n z-index: 2000; /* Sit on top */\n left: 0;\n top: 0;\n margin-top: 80px;\n width: var(--mwidth);\n margin-left: calc((100% - (var(--mwidth)))/2);\n height: 260px;\n \n overflow: auto; /* Enable scroll if needed */\n background-color: rgb(0, 0, 0); /* Fallback color */\n background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */\n }\n \n /* Modal Content */\n .modal-content {\n background-color: #fefefe;\n padding: 12px;\n border: 1px solid #888;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":320,"y":220,"wires":[[]]},{"id":"db5030bb15132bad","type":"ui_group","name":"Modal Testing","tab":"ce82cf5f4b6be9ac","order":6,"disp":false,"width":"6","collapse":false,"className":""},{"id":"ce82cf5f4b6be9ac","type":"ui_tab","name":"Modal Testing","icon":"dashboard","order":8,"disabled":false,"hidden":false}]
The problem is the "The modal section" element. It is required that it is displayed above all other elements, as with first PNG (Firefox).
On iPhone, however, it is shown behind "Text field2". (The shift to the right is not relevant here at the moment).
Is there a CSS formulation that ensures that the display on Apple (iPhone/OSX and MacOS) / WEBkit looks the same as on Firefox?
Or should the modal display be done differently?