This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
Inputbar incorrect position after keyboard appear on iPad presented as formsheet #651
Open
4 tasks done
Description
When present SLKTextViewController on iPad in formsheet style. Input bar position was not computed correctly when keyboard appears. Portrait orientation does not repro the issue.
Reproducible in:
SlackTextViewController version: 1.9.6
iOS version(s): iOS 11
Device(s): iPad Air 2
Steps to reproduce:
Expected result:
Input bar should be stick on top of keyboard.
Actual result:
There is an empty gap between the input bar and the keyboard.
Attachments:
Investigation
Briefly look at the source code, I suspect the problem is in
SlackTextViewController/Source/SLKTextViewController.m
Lines 405 to 423 in 37f91f2
When keyboard appeared on landscape, the formsheet is been pushed up. ConvertRect will return the keyboardRect on origin view frame, result in incorrect keyboardHeight been computed. I tried to fix the issue by moving
SlackTextViewController/Source/SLKTextViewController.m
Lines 1407 to 1409 in 37f91f2
from slk_willShowOrHideKeyboard to slk_didShowOrHideKeyboard. But then it loses smooth transition on input bar moving up with keyboard. Any suggestions?
The text was updated successfully, but these errors were encountered: