ionic 4在键盘上方显示页脚

时间:2018-12-31 15:49:57

标签: angular ionic-framework

enter image description here enter image description here我的应用程序ionic 4中的键盘有问题。 显示键盘时,页脚中的文本框处于隐藏状态,这使得看不到该文本框中写的内容。

without keyboard

when the keyboard is displayed

感谢您为我的问题提出解决方案

3 个答案:

答案 0 :(得分:0)

如果可以的话,我可以确定您已将应用程序设置为全屏模式,因此请删除全屏模式,因为它不适用于离子4页脚输入。

答案 1 :(得分:0)

您是否尝试过使用常规<input type="text">而不是<ion-input type="text">。这对我来说对离子3很容易解决。

答案 2 :(得分:0)

带电容器的 Ionic 5 工作解决方案, 在键盘事件上添加监听器,我们可以切换整个 ion-footer 元素来向上或向下变换。 请注意 translate3d keyboardHeight 中的减号。

function cellRenderer(props) {
    console.log(props);
    return (
        <CellMeasurer cache={cache} columnIndex={props.columnIndex} parent={props.parent} rowIndex={props.rowIndex}>
            <div>{props.cellData}</div>
        </CellMeasurer>
    );
}