I have an application that contains a main screen and an edition popup. Both are div
s, with the popup div
having a bigger z-index
, and covering the whole screen :
<div id="my-main-screen">
<!-- ... -->
</div>
<div id="my-popup" style="z-index: 1; width: 100%; height:100%; top:0px; left:0px">
<!-- ... -->
</div>
My problem is the following :
- On mobile, focusing in and out of text fields in my popup shows and hides the virtual keyboard, which triggers a
window
'sresize
event. - Resizing also resizes the main screen
div
, which is useless and slow, because my main screen is rather complex - The result is that focusing in and out of text fields in my popup
div
feel slow and irresponsive.
I tried hiding the main screen div. It works when in the popup... but then when I close the popup I have to make the main screen visible again, and that is as slow as resizing.
Is there a way to disable resizing on just the main screen div
, without hiding it ?