Can I enable/disable responsiveness at runtime?
I have a menu designed in HTML5 using Animate 20.5.
It needs to be responsive 99% of the time, so I have "Make Responsive: Both" set in my Animate Publish Settings.
The menu runs on a webpage that is also using sweetalerts2.
I use a sweetalerts popup to ask the user for a password at one point. The problem I'm seeing is that on a smartphone, when the sweetalerts popup shows up with the text input field, the smartphone pops up the on-screen keyboard, which causes my menu to resize. I don't want that.
In sweetalerts, I can call a function before the popup opens, and another function after the popup closes.
Is there a way to disable responsiveness of my project when the popup opens, and re-enable responsiveness when the popup closes?
It looks like the responsiveness is handled in Animate by the makeResponsive function, which adds an eventListener to window for the "resize" event. It would be nice if I could remove this event listener temporarily, and re-add it, but because I don't have a reference to the callback function (resizeCanvas), I can't remove the event listener. Is there something obvious I'm missing?
Calling
AdobeAn.makeResponsive(true, ...and
AdobeAn.makeResponsive(false, ...
almost works, but when you use that to disable responsiveness, it reverts the menu to full size first, which I also don't want. I just want it to stay the size it is for a while, without being responsive.