Keyboard, footer, modal

There is the “hide-on-keyboard-open” class that allows to hide footer (or other element) if keyboard shows up. This works ok, but until there’s a modal (e.g. prompt) and keyboard opens. In that case the footer isn’t hidden and everything messes up. Could you please assist me with getting rid of this effect?