iOS Safari header disappears when keyboard is shown - ios

I have a website that uses the iOS safari tag „black-translucent“ and a coloured header that is „sticky“ to the top (the unsafe area), so that the time and battery (text color is white) is visible when the user scrolls.
Now when the user enters a text into a field and the keyboard shows up, the sticky header moves up and the time and battery (which are still white) are on top of my white website background and thus not visible.
How can I keep my header sticky to the top unsafe area when the keyboard is visible?
keyboard not shown
Keyboard shown
I searched stackoverflow and found out that there seems to be some buggieness around the iOS keyboard and the visible areas..
Maybe there’s a sort of hack?
Maybe scroll?

header position absolute did it for me whenever an input is in focus and reverts to sticky when input is out of focus.
With a seperate ontouchmove event listener the text field is blurred and keyboard gets hidden.
It's a bit hacky but it works especially on devices with a notch.

Related

How to show stickers (or other views) under UIInputAccessoryView on iOS?

I'm building a chat interface and I'm curious how apps like Telegram and iMessage achieve the following:
There's an always-on input bar that stays above the keyboard (or at the bottom of the screen if there's no keyboard). This is most likely a UIInputAccessoryView, and I've got this implemented.
There's a sticker button on the bar that, when tapped, dismisses the keyboard AND keeps the input bar in-place AND reveals another view under it that is some other view (containing stickers, etc.) The input bar basically doesn't move at all. The animation is exactly like the keyboard going away, revealing the view that appears to have always been there.
If the keyboard is hidden, tapping on the sticker button does the same as 2. What's really cool is that the sticker view is always the same height as the keyboard - and note that keyboards of different languages can be of different height (autocomplete bar), and at least in Telegram's case it can always find the right height.
Any pointer to how to achieve this is appreciated!

how to always show TextView text above keyboard in swift?

I have a Textview that's covered partially by the keyboard when it shows. As a result, the text which entered into the space covered by the keyboard can not be seen as it is typed.
How do I make the TextView scroll up when the entered text reached the space covered by the keyboard?
I have scroll enabled on the TextView but since all the text is visible on the screen , the vertical scroll bar is not visible. Can I have the vertical scroll bar visible at all time event when editing?
Best solution use IQKeyboardManager
library.
IQKeyboardManager works on all orientations, and with the toolbar.
There are also nice optional features allowing you to customize the
distance from the text field, add the next/previous done button as a
keyboard UIToolbar, play sounds when the user navigations through the
form and more.

stop keyboard from shifting app up and enabling scroll in IOS 7/8

We have an app that is a fixed width and height and does not allow the user to scroll. As part of this app we have a navbar that is fixed to the screen under the status area. This all works great.
The problem is that when a keyboard is shown, it shifts our app window up to make room for the keyboard. At this point its possible to scroll our app and the titlebar which should be fixed to the top is no longer on screen.
Ideally the keyboard would still show, but our app window would resize so its not as tall, but items fixed to the top are still fixed to the top. also, you should not be able to scroll the window at this point.
So as Sani mentioned in a comment the Iconic keyboard plugin does in fact do what I'm looking for:
https://github.com/driftyco/ionic-plugins-keyboard
using:
cordova.plugins.Keyboard.disableScroll(true);
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);

Focused UITextField loses align and starts flickering when back to foreground

I have UITextField that is a first responder, when appropriate button is pressed application goes to background and opens Phone app. When I get back to my app instead of centre vertical alignment it appears as bottom vertical alignment and it appears/disappears after every second letter is inputed. I tried several solutions, but non of them worked. If I pop the screen, and come back to it again problem is fixed, but after going to background and foreground again this bug appears again.

IOS keyboard changed its animation

I have an ios app, and it's responsive to keyboard appearance.
Before, the keyboard used to slide in from the bottom up
now it appears from the left corner of the top of the keyboard frame down
What happened to create this change? I cannot find any methods that control how the keyboard becomes visible on the screen

Resources