Keyboard Panning Fixes

Many small fixes suggested by @efremidze (thanks!), related to keyboard panning offset, so the dragging gesture starts at the top of the text input bar.